diff --git a/index.bs b/index.bs index 7ed95ff2..35283a9a 100644 --- a/index.bs +++ b/index.bs @@ -1980,7 +1980,7 @@ partial interface MLGraphBuilder { 1. [=Assert=]: the type of |inputs| is sequence of {{MLOperand}} objects. 1. [=Assert=]: the type of |axis| is `unsigned long`. - 1. [=Assert=]: the shape, i.e. {{MLOperandDescriptor/dimensions}}) of each operand in |inputs| is the same, except on the dimension given by |axis| on which they are concatenated. + 1. [=Assert=]: the shape, i.e. {{MLOperandDescriptor/dimensions}} of each operand in |inputs| is the same, except on the dimension given by |axis| on which they are concatenated. 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]]}}. @@ -2139,7 +2139,7 @@ partial interface MLGraphBuilder { 1. Let |filterSize| be the [=list/size=] of |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}. 1. If |inputSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}. 1. If |filterSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}. - 1. If the type of |input| and |filter| is not the same, then [=exception/throw=] a {{TypeError}}. + 1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as {{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConv2dOptions/padding}} does not [=map/exist=], set it to `« 0, 0, 0, 0 »`. 1. Else if the [=list/size=] of |options|.{{MLConv2dOptions/padding}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}. 1. If |options|.{{MLConv2dOptions/strides}} does not [=map/exist=], set it to `« 1, 1 »`. @@ -2315,7 +2315,7 @@ partial interface MLGraphBuilder { 1. Let |filterSize| be the [=list/size=] of |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}. 1. If |inputSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}. 1. If |filterSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}. - 1. If the type of |input| and |filter| is not the same, then [=exception/throw=] a {{TypeError}}. + 1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as {{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConvTranspose2dOptions/padding}} does not [=map/exist=], set it to `« 0, 0, 0, 0 »`. 1. Else if the [=list/size=] of |options|.{{MLConvTranspose2dOptions/padding}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}. 1. If |options|.{{MLConvTranspose2dOptions/strides}} does not [=map/exist=], set it to `« 1, 1 »`. @@ -4107,7 +4107,7 @@ partial interface MLGraphBuilder { 1. If |sizeA| and |sizeB| is 1, return `« 1 »`. 1. If |sizeA| is 1 and |sizeB| is not, then insert 1 in the front of |shapeA| to become [ 1 | |shapeA| ] and let |sizeA| be 2. 1. If |shapeA|[0] is not equal to |shapeB|[|sizeB| - 2], then [=exception/throw=] an "{{OperationError}}" {{DOMException}}. - 1. If |sizeB| is 1 and |sizeA| is not, then insert 1 in the front of |shapeB| to become [ 1 | |shapeB| ] and let |sizeB| be 2. + 1. If |sizeB| is 1 and |sizeA| is not, then append 1 to |shapeB| to become [ |shapeB| | 1 ] and let |sizeB| be 2. 1. If |shapeA|[|sizeA| - 1] is not equal to |shapeB|[0], then [=exception/throw=] an "{{OperationError}}" {{DOMException}}. 1. If |shapeA| is not equal to |shapeB|, then [=exception/throw=] an "{{OperationError}}" {{DOMException}}. 1. Let |shape| be an array whose size |size| is the maximum of |sizeA| and |sizeB|.