Skip to content

Commit 83262c6

Browse files
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
1 parent c44fe62 commit 83262c6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.bs

+6-6
Original file line numberDiff line numberDiff line change
@@ -897,18 +897,18 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are
897897

898898
<details open algorithm>
899899
<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:
901901
</summary>
902902
<div class=algorithm-steps>
903-
1. Let |activation| be a new [=object=].
903+
1. Let |activation| be a new {{MLActivation}}.
904904
1. Set |activation|.{{MLActivation/[[builder]]}} to |builder|.
905905
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|.
907907
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
908908
1. Make a request to the underlying platform to:
909909
1. Create an [=implementation-defined=] platform operator |opImpl| for the given |name| operation.
910910
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|.
912912
1. Otherwise, initialize |activation|.{{MLActivation/[[operator]]}} given |options| in an [=implementation-defined=] way for the given |name| operation.
913913
1. Return |activation|.
914914
</div>
@@ -6179,7 +6179,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
61796179
<div class=algorithm-steps>
61806180
1. [=Assert=]: the type of |builder| is {{MLGraphBuilder}}.
61816181
1. [=Assert=]: the type of |desc| is {{MLOperandDescriptor}}.
6182-
1. Let |operand| be a new [=object=].
6182+
1. Let |operand| be a new {{MLOperand}}.
61836183
1. Set |operand|.{{MLOperand/[[builder]]}} to |builder|.
61846184
1. Set |operand|.{{MLOperand/[[descriptor]]}} to |desc|.
61856185
1. Return |operand|.
@@ -6192,7 +6192,7 @@ The {{MLOperand}} objects are created by the methods of {{MLGraphBuilder}}, inte
61926192
</summary>
61936193
<div class=algorithm-steps>
61946194
1. [=Assert=]: the type of |operand| is {{MLOperand}}.
6195-
1. Let |result| be a new [=object=].
6195+
1. Let |result| be a new {{MLOperand}}.
61966196
1. Set |result|.{{MLOperand/[[builder]]}} to |operand|.{{MLOperand/[[builder]]}}.
61976197
1. Set |result|.{{MLOperand/[[descriptor]]}} to |operand|.{{MLOperand/[[descriptor]]}}.
61986198
1. If |operand|.{{MLOperand/[[name]]}} [=map/exists=], then set |result|.{{MLOperand/[[name]]}} to |operand|.{{MLOperand/[[name]]}}.

0 commit comments

Comments
 (0)