1. Let |operand| be the first argument.
1. Let |options| be the second argument.
- 1. If running the
steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
steps given |operand|.
1. Make a request to the underlying platform to:
@@ -1951,7 +1950,7 @@ partial interface MLGraphBuilder {
1. Let |options| be the first argument.
- 1. If running the
check clamp options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check clamp options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. Let |op| be the result of invoking the
create MLActivation steps with `"clamp"` and |options|.
1. If that throws an error, re-throw the error and abort these steps.
1. Return |op|.
@@ -2148,15 +2147,15 @@ partial interface MLGraphBuilder {
1. Let |filter_size| be the size of |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
1. If |input_size| is not `4`, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |filter_size| is not `4`, then throw a "{{DataError}}" {{DOMException}} and stop.
- 1. If the type of |input| and |filter| is not the same, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If the type of |input| and |filter| is not the same, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLConv2dOptions/padding}} is `undefined`, set it to `[0, 0, 0, 0]`.
1. Else if |options|.{{MLConv2dOptions/padding}}.length is not 4, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLConv2dOptions/strides}} is `undefined`, set it to `[1, 1]`.
- 1. Else if |options|.{{MLConv2dOptions/strides}}.length is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. Else if |options|.{{MLConv2dOptions/strides}}.length is not `2`, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConv2dOptions/dilations}} is `undefined`, set it to `[1, 1]`.
- 1. Else if |options|.{{MLConv2dOptions/dilations}}.length is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. Else if |options|.{{MLConv2dOptions/dilations}}.length is not `2`, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConv2dOptions/autoPad}} is `undefined`, set it to `"explicit"`.
1. If |options|.{{MLConv2dOptions/groups}} is `undefined`, set it to `1`.
1. Else if |options|.{{MLConv2dOptions/groups}} is 0, then throw a "{{DataError}}" {{DOMException}} and stop.
@@ -2166,8 +2165,8 @@ partial interface MLGraphBuilder {
1. If |options|.{{MLConv2dOptions/filterLayout}} is `undefined`, set it to `"oihw"`.
1. If |options|.{{MLConv2dOptions/bias}} [=map/exists=]:
1. [=Assert=]: the type of |options|.{{MLConv2dOptions/bias}} is {{MLOperand}}.
- 1. If the length of |options|.{{MLConv2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is not 1, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If |options|.{{MLConv2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If the length of |options|.{{MLConv2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is not 1, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If |options|.{{MLConv2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConv2dOptions/activation}} [=map/exists=]:
1. [=Assert=]: the type of |options|.{{MLConv2dOptions/activation}} is {{MLActivation}}.
1. Let |output_shape| be the result of invoking the underlying implementation for calculating output dimensions, given |options|.
@@ -2327,19 +2326,19 @@ partial interface MLGraphBuilder {
1. Let |filter_size| be the size of |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
1. If |input_size| is not `4`, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |filter_size| is not `4`, then throw a "{{DataError}}" {{DOMException}} and stop.
- 1. If the type of |input| and |filter| is not the same, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If the type of |input| and |filter| is not the same, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLConvTranspose2dOptions/padding}} is `undefined`, set it to `[0, 0, 0, 0]`.
1. Else if |options|.{{MLConvTranspose2dOptions/padding}}.length is not 4, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/strides}} is `undefined`, set it to `[1, 1]`.
- 1. Else if |options|.{{MLConvTranspose2dOptions/strides}}.length is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. Else if |options|.{{MLConvTranspose2dOptions/strides}}.length is not `2`, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/dilations}} is `undefined`, set it to `[1, 1]`.
- 1. Else if |options|.{{MLConvTranspose2dOptions/dilations}}.length is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. Else if |options|.{{MLConvTranspose2dOptions/dilations}}.length is not `2`, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/outputPadding}} is `undefined`, set it to `[0, 0]`.
- 1. Else if |options|.{{MLConvTranspose2dOptions/outputPadding}}.length is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. Else if |options|.{{MLConvTranspose2dOptions/outputPadding}}.length is not `2`, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/outputSizes}} [=map/exists=]:
- 1. If |options|.{{MLConvTranspose2dOptions/outputSizes}}.length is not `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLConvTranspose2dOptions/outputSizes}}.length is not `2`, then [=exception/throw=] a {{TypeError}} and stop.
1. If the elements of |options|.{{MLConvTranspose2dOptions/outputSizes}} are not smaller than the elements at the same dimension (index) for |options|.{{MLConvTranspose2dOptions/strides}}, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/autoPad}} is `undefined`, set it to `"explicit"`.
1. If |options|.{{MLConvTranspose2dOptions/groups}} is `undefined`, set it to `1`.
@@ -2349,8 +2348,8 @@ partial interface MLGraphBuilder {
1. If |options|.{{MLConvTranspose2dOptions/filterLayout}} is `undefined`, set it to `"iohw"`.
1. If |options|.{{MLConvTranspose2dOptions/bias}} [=map/exists=]:
1. [=Assert=]: the type of |options|.{{MLConvTranspose2dOptions/bias}} is {{MLOperand}}.
- 1. If the length of |options|.{{MLConvTranspose2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is not 1, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If |options|.{{MLConvTranspose2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If the length of |options|.{{MLConvTranspose2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is not 1, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If |options|.{{MLConvTranspose2dOptions/bias}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLConvTranspose2dOptions/activation}} [=map/exists=]:
1. [=Assert=]: the type of |options|.{{MLConvTranspose2dOptions/activation}} is {{MLActivation}}.
1. Let |output_shape| be the result of invoking the underlying implementation for calculating output dimensions, given |options|.
@@ -2668,7 +2667,7 @@ partial interface MLGraphBuilder {
1. Let |input| be the first argument.
1. Let |options| be the second argument.
- 1. If running the
check ELU options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check ELU options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -2699,7 +2698,7 @@ partial interface MLGraphBuilder {
1. Let |options| be the first argument.
1. If |options| is `undefined`, let |options| be a new {{MLEluOptions}} object.
- 1. If running the
check ELU options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check ELU options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. Let |op| be the result of invoking the
create MLActivation steps with `"elu"` and |options|.
1. Return |op|.
@@ -2913,11 +2912,11 @@ partial interface MLGraphBuilder {
1. If |options|.{{MLGruOptions/resetAfter}} is `undefined`, set it to `true`.
1. If |options|.{{MLGruOptions/returnSequence}} is `undefined`, set it to `false`.
1. If |options|.{{MLGruOptions/direction}} is `undefined`, set it to `"forward"`.
- 1. If |options|.{{MLGruOptions/direction}} is not one of {{MLRecurrentNetworkDirection}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLGruOptions/direction}} is not one of {{MLRecurrentNetworkDirection}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLGruOptions/layout}} is `undefined`, set it to `"zrn"`.
- 1. If |options|.{{MLGruOptions/layout}} is not one of {{MLGruWeightLayout}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If |options|.{{MLGruOptions/activations}} [=map/exists=] and is not an array of {{MLActivation}} objects with size `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If |steps| is not a [=number=] or it is `0`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLGruOptions/layout}} is not one of {{MLGruWeightLayout}}, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If |options|.{{MLGruOptions/activations}} [=map/exists=] and is not an array of {{MLActivation}} objects with size `2`, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If |steps| is not a [=number=] or it is `0`, then [=exception/throw=] a {{TypeError}} and stop.
1. Let |output| be an empty sequence of {{MLOperand}} objects.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Make a request to the underlying platform to:
@@ -3064,8 +3063,8 @@ partial interface MLGraphBuilder {
1. If its rank is not `1`, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLGruOptions/resetAfter}} is `undefined`, set it to `true`.
1. If |options|.{{MLGruOptions/layout}} is `undefined`, set it to `"zrn"`.
- 1. If |options|.{{MLGruOptions/layout}} is not one of {{MLGruWeightLayout}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If |options|.{{MLGruOptions/activations}} [=map/exists=] and is not an array of {{MLActivation}} objects with size `2`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLGruOptions/layout}} is not one of {{MLGruWeightLayout}}, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If |options|.{{MLGruOptions/activations}} [=map/exists=] and is not an array of {{MLActivation}} objects with size `2`, then [=exception/throw=] a {{TypeError}} and stop.
1. Let |desc| a new {{MLOperandDescriptor}}.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to [ |input|.{{MLOperandDescriptor/dimensions}}[0], |hiddenSize| ].
1. Set |desc|.{{MLOperandDescriptor/type}} to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}.
@@ -3256,7 +3255,7 @@ partial interface MLGraphBuilder {
The {{MLGraphBuilder/hardSigmoid(input, options)}} method steps are:
1. Let |input| be the first argument.
1. Let |options| be the second argument.
- 1. If running the
check hard-sigmoid options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check hard-sigmoid options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -3284,7 +3283,7 @@ partial interface MLGraphBuilder {
1. Let |options| be the first argument.
- 1. If running the
check hard-sigmoid options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check hard-sigmoid options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. Let |op| be the result of invoking the
create MLActivation steps with `"hardSigmoid"` and |options|.
1. If that throws an error, re-throw the error and abort these steps.
1. Return |op|.
@@ -3548,7 +3547,7 @@ partial interface MLGraphBuilder {
1. Let |input| be the first argument.
1. Let |options| be the second argument.
1. If |options| is `undefined`, let |options| be a new {{MLLeakyReluOptions}} object.
- 1. If running the
check leaky-relu options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check leaky-relu options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -3578,7 +3577,7 @@ partial interface MLGraphBuilder {
1. Let |options| be the first argument.
1. If |options| is `undefined`, let |options| be a new {{MLLeakyReluOptions}} object.
- 1. If running the
check leaky-relu options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check leaky-relu options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. Let |op| be the result of invoking the
create MLActivation steps with `"leakyRelu"` and |options|.
1. If that throws an error, re-throw the error and abort these steps.
1. Return |op|.
@@ -3659,7 +3658,7 @@ partial interface MLGraphBuilder {
1. Let |input| be the first argument.
1. Let |options| be the second argument.
- 1. If running the
check linear options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check linear options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -3688,7 +3687,7 @@ partial interface MLGraphBuilder {
1. Let |options| be the first argument.
- 1. If running the
check linear options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check linear options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. Let |op| be the result of invoking the
create MLActivation steps with `"linear"` and |options|.
1. If that throws an error, re-throw the error and abort these steps.
1. Return |op|.
@@ -3781,7 +3780,7 @@ partial interface MLGraphBuilder {
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLLstmOptions/direction}} is `undefined`, set it to `"forward"`.
- 1. If |options|.{{MLLstmOptions/direction}} is not one of {{MLRecurrentNetworkDirection}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLLstmOptions/direction}} is not one of {{MLRecurrentNetworkDirection}}, then [=exception/throw=] a {{TypeError}} and stop.
1. Let |num_directions| be `1` if |options|.{{MLLstmOptions/direction}} is `"forward"`, or otherwise let it be `2`.
1. [=Assert=]: the type of |input|, |weight| and |recurrentWeight| is {{MLOperand}}.
@@ -3818,9 +3817,9 @@ partial interface MLGraphBuilder {
1. If |options|.{{MLLstmOptions/initialCellState}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[2] is not |hiddenSize|, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLLstmOptions/returnSequence}} is `undefined`, set it to `false`.
1. If |options|.{{MLLstmOptions/layout}} is `undefined`, set it to `"iofg"`.
- 1. If |options|.{{MLLstmOptions/layout}} is not one of {{MLLstmWeightLayout}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLLstmOptions/layout}} is not one of {{MLLstmWeightLayout}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLLstmOptions/activations}} [=map/exists=]:
- 1. If it is not an array of size `3`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If it is not an array of size `3`, then [=exception/throw=] a {{TypeError}} and stop.
1. [=Assert=]: the type of its elements is {{MLActivation}}.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |desc| a new {{MLOperandDescriptor}}.
@@ -4000,9 +3999,9 @@ partial interface MLGraphBuilder {
1. If its rank is not `1`, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLLstmCellOptions/peepholeWeight}}.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[0] is not 3 * |hiddenSize|, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If |options|.{{MLLstmCellOptions/layout}} is `undefined`, set it to `"iofg"`.
- 1. If |options|.{{MLLstmCellOptions/layout}} is not one of {{MLLstmWeightLayout}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLLstmCellOptions/layout}} is not one of {{MLLstmWeightLayout}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLLstmCellOptions/activations}} [=map/exists=]:
- 1. If it is not an array of size `3`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If it is not an array of size `3`, then [=exception/throw=] a {{TypeError}} and stop.
1. [=Assert=]: the type of its elements is {{MLActivation}}.
1. Let |desc| a new {{MLOperandDescriptor}}.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to [ |batch_size|, |hiddenSize| ].
@@ -4273,10 +4272,10 @@ partial interface MLGraphBuilder {
1. [=Assert=]: the type of |input| is {{MLOperand}}.
- 1. If |beginningPadding| or |endingPadding| is not a sequence of {{unsigned long}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |beginningPadding| or |endingPadding| is not a sequence of {{unsigned long}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLPadOptions/mode}} is `undefined`, set it to `"constant"`.
- 1. Otherwise, if |options|.{{MLPadOptions/mode}} is not one of {{MLPaddingMode}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. Otherwise, if |options|.{{MLPadOptions/mode}} is not one of {{MLPaddingMode}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If |options|.{{MLPadOptions/value}} is `undefined`, set it to `0`.
1. Let |desc| be a copy of |input|.{{MLOperand/[[descriptor]]}}.
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the result of invoking the
calculate padding output sizes given |input|, |beginningPadding| and |endingPadding|.
@@ -5025,8 +5024,8 @@ partial interface MLGraphBuilder {
1. [=Assert=]: the type of |input| is {{MLOperand}}.
- 1. If |starts| or |sizes| is not a sequence of {{long}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If |sizes|.size is 0, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |starts| or |sizes| is not a sequence of {{long}}, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If |sizes|.size is 0, then [=exception/throw=] a {{TypeError}} and stop.
Further validation of |starts| and |sizes| given |input| is left [=implementation-defined=].
@@ -5191,7 +5190,7 @@ partial interface MLGraphBuilder {
1. Let |input| be the first argument.
1. Let |options| be the second argument.
- 1. If running the
check softplus options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check softplus options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -5220,7 +5219,7 @@ partial interface MLGraphBuilder {
1. Let |options| be the first argument.
- 1. If running the
check softplus options steps with |options| returns `false`, then throw a "{{TypeError}}" {{DOMException}} and abort these steps.
+ 1. If running the
check softplus options steps with |options| returns `false`, then [=exception/throw=] a {{TypeError}} and abort these steps.
1. Let |op| be the result of invoking the
create MLActivation steps with `"softplus"` and |options|.
1. If that throws an error, re-throw the error and abort these steps.
1. Return |op|.
@@ -5336,7 +5335,7 @@ partial interface MLGraphBuilder {
1. [=Assert=]: the type of |input| is {{MLOperand}}.
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLSplitOptions/axis}} is `undefined`, let |options|.{{MLSplitOptions/axis}} be `0`.
- 1. If |splits| is not {{unsigned long}} or a sequence of {{unsigned long}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |splits| is not {{unsigned long}} or a sequence of {{unsigned long}}, then [=exception/throw=] a {{TypeError}} and stop.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -5415,7 +5414,7 @@ partial interface MLGraphBuilder {
1. Let |dimensions| be |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
1. For |index| between 0 and the size of |options|.{{MLSqueezeOptions/axes}}:
1. Let |oneDimIndex| be |options|.{{MLSqueezeOptions/axes}}[|index|].
- 1. If |dimensions|[|oneDimIndex|] is not `1`, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |dimensions|[|oneDimIndex|] is not `1`, then [=exception/throw=] a {{TypeError}} and stop.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to:
@@ -5541,10 +5540,10 @@ partial interface MLGraphBuilder {
1. If |options| is `undefined`, let |options| be an empty [=object=].
1. If |options|.{{MLTransposeOptions/permutation}} is `undefined`, let |options|.{{MLTransposeOptions/permutation}} be the reversed sequence of all indices for |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
1. Otherwise if |options|.{{MLTransposeOptions/permutation}} [=map/exists=]:
- 1. If |options|.{{MLTransposeOptions/permutation}} is not a sequence of {{unsigned long}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If the rank of |options|.{{MLTransposeOptions/permutation}} is not the same as the rank of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If the values in |options|.{{MLTransposeOptions/permutation}} are not between `0` and the rank of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} minus `1`, then throw a "{{TypeError}}" {{DOMException}} and stop.
- 1. If the values in |options|.{{MLTransposeOptions/permutation}} contain duplicate value, then throw a "{{TypeError}}" {{DOMException}} and stop.
+ 1. If |options|.{{MLTransposeOptions/permutation}} is not a sequence of {{unsigned long}}, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If the rank of |options|.{{MLTransposeOptions/permutation}} is not the same as the rank of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If the values in |options|.{{MLTransposeOptions/permutation}} are not between `0` and the rank of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} minus `1`, then [=exception/throw=] a {{TypeError}} and stop.
+ 1. If the values in |options|.{{MLTransposeOptions/permutation}} contain duplicate value, then [=exception/throw=] a {{TypeError}} and stop.
1. If any of the following sub-steps fail, throw an "{{OperationError}}" {{DOMException}} and stop.
1. Let |output| be the result of invoking the
copy MLOperand steps given |input|.
1. Make a request to the underlying platform to: