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
1. [=Assert=]: the {{MLOperandDescriptor/type}} of each operand in |inputs| is the same.
1991
1991
1. If any of the following steps fail, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1992
1992
1. Let |desc| be |inputs|[0].{{MLOperand/[[descriptor]]}}.
1993
-
1. If |axis| is greater than or equal to the [=rank=] of |desc|, fail.
1993
+
1. If |axis| is greater than or equal to the [=rank=] of |desc|, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1994
1994
1. Let |desc|.{{MLOperandDescriptor/dimensions}}[|axis|] be 0.
1995
1995
1. [=map/For each=] |index| in [=the range=] 0 to the [=rank=] of |inputs|, exclusive:
1996
-
1. If <a>validating MLOperand</a> given |inputs|[|index|] and [=this=] returns false, then fail.
1996
+
1. If <a>validating MLOperand</a> given |inputs|[|index|] and [=this=] returns false, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1997
1997
1. [=map/For each=] |dim| in [=the range=] 0 to the [=rank=] of |inputs|[|index|].{{MLOperandDescriptor/dimensions}}, exclusive:
1998
1998
<div class="note">
1999
1999
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.
2000
2000
</div>
2001
-
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.
2002
-
1. If |inputs|[|dim|].{{MLOperandDescriptor/type}} is not equal to |inputs|[0].{{MLOperandDescriptor/type}}.
2001
+
1. If |inputs|[|index|].{{MLOperandDescriptor/type}} is not equal to |inputs|[0].{{MLOperandDescriptor/type}}.
2002
+
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}}.
2003
2003
1. If |dim| is equal to |axis|, add to |desc|.{{MLOperandDescriptor/dimensions}}[|axis|] the value of |inputs|[|index|].{{MLOperandDescriptor/dimensions}}[|dim|].
2004
2004
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
2005
2005
1. Let |output| be the result of <a>creating an MLOperand</a> given [=this=] and |desc|.
0 commit comments