Skip to content

Commit

Permalink
Wording change: Tidy up a more arrays within algorithms to be lists (#…
Browse files Browse the repository at this point in the history
…521)

Co-authored-by: Ningxin Hu <[email protected]>
  • Loading branch information
inexorabletash and huningxin authored Jan 27, 2024
1 parent 5c3e2f9 commit 56cab5d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3368,7 +3368,7 @@ partial interface MLGraphBuilder {
1. If its [=rank=] is not equal to 3 * |hiddenSize|, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. If |options|.{{MLGruOptions/activations}} [=map/exists=] and its [=list/size=] is not 2, then [=exception/throw=] a {{TypeError}}.
1. Let |desc| be a new {{MLOperandDescriptor}}.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to [ |input|.{{MLOperandDescriptor/dimensions}}[0], |hiddenSize| ].
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |input|.{{MLOperandDescriptor/dimensions}}[0], |hiddenSize| ».
1. Set |desc|.{{MLOperandDescriptor/dataType}} to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
Expand Down Expand Up @@ -4195,15 +4195,15 @@ partial interface MLGraphBuilder {
1. If its [=list/size=] is not 3, then [=exception/throw=] a {{TypeError}}.
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
1. Let |desc| be a new {{MLOperandDescriptor}}.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to [ |numDirections|, |batchSize|, |hiddenSize| ].
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |numDirections|, |batchSize|, |hiddenSize| ».
1. Set |desc|.{{MLOperandDescriptor/dataType}} to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
1. Let |output0| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
1. Let |output1| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to [ |steps|, |numDirections|, |batchSize|, |hiddenSize| ].
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |steps|, |numDirections|, |batchSize|, |hiddenSize| ».
1. If |options|.{{MLLstmOptions/returnSequence}} is set to true:
1. Let |output2| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
1. Let |output| be the array [ |output0|, |output1|, |output2| ].
1. Otherwise, Let |output| be the array [ |output0|, |output1| ].
1. Let |output| be the [=/list=] « |output0|, |output1|, |output2| ».
1. Otherwise, let |output| be the [=/list=] « |output0|, |output1| ».
1. Make a request to the underlying platform to:
1. Let |opImpl| be an [=implementation-defined=] platform operator for the LSTM operation, given |weight|, |recurrentWeight|, |steps|, |hiddenSize| and |options|.
1. Set |output0|.{{MLOperand/[[operator]]}}, |output1|.{{MLOperand/[[operator]]}} and |output2|.{{MLOperand/[[operator]]}} to |opImpl|.
Expand Down Expand Up @@ -4375,12 +4375,12 @@ partial interface MLGraphBuilder {
1. If |options|.{{MLLstmCellOptions/activations}} [=map/exists=]:
1. If its [=list/size=] is not 3, then [=exception/throw=] a {{TypeError}}.
1. Let |desc| be a new {{MLOperandDescriptor}}.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to [ |batchSize|, |hiddenSize| ].
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |batchSize|, |hiddenSize| ».
1. Set |desc|.{{MLOperandDescriptor/dataType}} to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
1. Let |output0| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
1. Let |output1| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
1. Let |output| be the array [ |output0|, |output1| ].
1. Let |output| be the [=/list=] « |output0|, |output1| ».
1. Make a request to the underlying platform to:
1. Let |opImpl| be an [=implementation-defined=] platform operator for the LSTM cell operation, given |weight|, |recurrentWeight|, |hiddenState|, |cellState|, |hiddenSize| and |options|.
1. Set |output0|.{{MLOperand/[[operator]]}} and |output1|.{{MLOperand/[[operator]]}} to |opImpl|.
Expand Down

0 comments on commit 56cab5d

Please sign in to comment.