Skip to content

Commit

Permalink
Fix the concat() steps
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Kis <[email protected]>
  • Loading branch information
zolkis committed Aug 25, 2023
1 parent 3f9f3b3 commit d04f364
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1990,16 +1990,16 @@ partial interface MLGraphBuilder {
1. [=Assert=]: the {{MLOperandDescriptor/type}} of each operand in |inputs| is the same.
1. If any of the following steps fail, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. Let |desc| be |inputs|[0].{{MLOperand/[[descriptor]]}}.
1. If |axis| is greater than or equal to the [=rank=] of |desc|, fail.
1. If |axis| is greater than or equal to the [=rank=] of |desc|, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. Let |desc|.{{MLOperandDescriptor/dimensions}}[|axis|] be 0.
1. [=map/For each=] |index| in [=the range=] 0 to the [=rank=] of |inputs|, exclusive:
1. If <a>validating MLOperand</a> given |inputs|[|index|] and [=this=] returns false, then fail.
1. If <a>validating MLOperand</a> given |inputs|[|index|] and [=this=] returns false, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. [=map/For each=] |dim| in [=the range=] 0 to the [=rank=] of |inputs|[|index|].{{MLOperandDescriptor/dimensions}}, exclusive:
<div class="note">
If the shape of each corresponding dimension and type of the operands, except for those of the dimension given by |axis|, is not the same, fail.
</div>
1. If |dim| is not equal to |axis| and if |inputs|[|index|].{{MLOperandDescriptor/dimensions}}[|dim|] is not equal to |inputs|[0].{{MLOperandDescriptor/dimensions}}[|dim|], fail.
1. If |inputs|[|dim|].{{MLOperandDescriptor/type}} is not equal to |inputs|[0].{{MLOperandDescriptor/type}}.
1. If |inputs|[|index|].{{MLOperandDescriptor/type}} is not equal to |inputs|[0].{{MLOperandDescriptor/type}}.
1. If |dim| is not equal to |axis| and if |inputs|[|index|].{{MLOperandDescriptor/dimensions}}[|dim|] is not equal to |inputs|[0].{{MLOperandDescriptor/dimensions}}[|dim|], then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. If |dim| is equal to |axis|, add to |desc|.{{MLOperandDescriptor/dimensions}}[|axis|] the value of |inputs|[|index|].{{MLOperandDescriptor/dimensions}}[|dim|].
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
1. Let |output| be the result of <a>creating an MLOperand</a> given [=this=] and |desc|.
Expand Down

0 comments on commit d04f364

Please sign in to comment.