You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wording change: New up a specific type, rather than just object (#512)
In algorithms that mint MLActivations and MLOperands, construct
the actual type not a generic "object". Also, use Infra wording
around optional paramters to those algorithms.
For #450
Copy file name to clipboardExpand all lines: index.bs
+6-6
Original file line number
Diff line number
Diff line change
@@ -897,18 +897,18 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are
897
897
898
898
<details open algorithm>
899
899
<summary>
900
-
To <dfn>create an MLActivation</dfn> given |builder|, |name|, |options| and |init-steps|, run the following steps:
900
+
To <dfn>create an MLActivation</dfn> given |builder|, |name|, optional |options| and optional |init-steps|, run the following steps:
901
901
</summary>
902
902
<div class=algorithm-steps>
903
-
1. Let |activation| be a new [=object=].
903
+
1. Let |activation| be a new {{MLActivation}}.
904
904
1. Set |activation|.{{MLActivation/[[builder]]}} to |builder|.
905
905
1. Set |activation|.{{MLActivation/[[name]]}} to |name|.
906
-
1. If |options| is an [=object=], set |activation|.{{MLActivation/[[options]]}} to |options|.
906
+
1. If |options| is given, set |activation|.{{MLActivation/[[options]]}} to |options|.
907
907
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
908
908
1. Make a request to the underlying platform to:
909
909
1. Create an [=implementation-defined=] platform operator |opImpl| for the given |name| operation.
910
910
1. Set |activation|.{{MLActivation/[[operator]]}} to |opImpl|.
911
-
1. If |init-steps| are defined, run |init-steps| with |options|.
911
+
1. If |init-steps| are given, run |init-steps| with |options|.
912
912
1. Otherwise, initialize |activation|.{{MLActivation/[[operator]]}} given |options| in an [=implementation-defined=] way for the given |name| operation.
913
913
1. Return |activation|.
914
914
</div>
@@ -6179,7 +6179,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
6179
6179
<div class=algorithm-steps>
6180
6180
1. [=Assert=]: the type of |builder| is {{MLGraphBuilder}}.
6181
6181
1. [=Assert=]: the type of |desc| is {{MLOperandDescriptor}}.
6182
-
1. Let |operand| be a new [=object=].
6182
+
1. Let |operand| be a new {{MLOperand}}.
6183
6183
1. Set |operand|.{{MLOperand/[[builder]]}} to |builder|.
6184
6184
1. Set |operand|.{{MLOperand/[[descriptor]]}} to |desc|.
6185
6185
1. Return |operand|.
@@ -6192,7 +6192,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
6192
6192
</summary>
6193
6193
<div class=algorithm-steps>
6194
6194
1. [=Assert=]: the type of |operand| is {{MLOperand}}.
6195
-
1. Let |result| be a new [=object=].
6195
+
1. Let |result| be a new {{MLOperand}}.
6196
6196
1. Set |result|.{{MLOperand/[[builder]]}} to |operand|.{{MLOperand/[[builder]]}}.
6197
6197
1. Set |result|.{{MLOperand/[[descriptor]]}} to |operand|.{{MLOperand/[[descriptor]]}}.
6198
6198
1. If |operand|.{{MLOperand/[[name]]}}[=map/exists=], then set |result|.{{MLOperand/[[name]]}} to |operand|.{{MLOperand/[[name]]}}.
0 commit comments