diff --git a/index.bs b/index.bs index c4cd7a24..e60b1576 100644 --- a/index.bs +++ b/index.bs @@ -1426,9 +1426,9 @@ The {{MLOpSupportLimits}} has the following top level members, aside from these, dictionary MLOpSupportLimits { MLInputOperandLayout preferredInputLayout; [EnforceRange] unsigned long long maxTensorByteLength; - MLDataTypeLimits input; - MLDataTypeLimits constant; - MLDataTypeLimits output; + MLTensorLimits input; + MLTensorLimits constant; + MLTensorLimits output; }; @@ -1444,18 +1444,6 @@ dictionary MLOpSupportLimits { : output :: Support limits for output {{MLOperand}}s for an {{MLGraph}}. -#### {{MLDataTypeLimits}} dictionary #### {#api-mlcontext-datatypelimits-dictionary} - -
- : dataTypes - :: Supported data types. -
#### {{MLRankRange}} dictionary #### {#api-mlcontext-rankrange-dictionary} @@ -1500,14 +1490,14 @@ dictionary MLBinarySupportLimits { : b :: {{MLTensorLimits}} for b operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. #### {{MLSingleInputSupportLimits}} dictionary #### {#api-mlcontext-singleinputsupportlimits-dictionary} @@ -1515,7 +1505,7 @@ dictionary MLSingleInputSupportLimits { : input :: {{MLTensorLimits}} for input operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. ### {{MLContext/destroy()}} ### {#api-mlcontext-destroy} @@ -1759,7 +1749,7 @@ Since the {{MLOperand/[[builder]]}} object is bound by the {{MLGraphBuilder/cons If an operation supports only a subset of {{MLOperandDataType}}s, the allowed data types for each of the operation's input operands, including both positional arguments and options, are given as either an explicit list of {{MLOperandDataType}}s, or a constraint that the operand's [=MLOperand/dataType=] must be the same as the [=MLOperand/dataType=] of another input operand, or any to allow any {{MLOperandDataType}}. -Implementations may support fewer data types for operands than specified. This can be queried for each operation using the {{MLContext/opSupportLimits()}} method on {{MLContext}} and inspecting the {{MLDataTypeLimits/dataTypes}} value of the corresponding member for the operation. +Implementations may support fewer data types for operands than specified. This can be queried for each operation using the {{MLContext/opSupportLimits()}} method on {{MLContext}} and inspecting the {{MLTensorLimits/dataTypes}} value of the corresponding member for the operation. Issue: Should we specify the subset of data types that must be supported for each operator? @@ -2232,11 +2222,11 @@ partial dictionary MLOpSupportLimits { - axis: The dimension to reduce. The value must be in the range [0, N-1] where N is the [=MLOperand/rank=] of the input tensor. - options: an optional {{MLArgMinMaxOptions}}. The optional parameters of the operation. - **Returns:** an {{MLOperand}}. The N-D tensor of the reduced shape. The values must be of type {{MLArgMinMaxOptions/outputDataType}} in the range [0, N-1] where N is the size of the input dimension specified by {{MLGraphBuilder/argMin(input, axis, options)/axis}}. + **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to {{MLGraphBuilder/argMin(input, axis, options)/input}}'s [=MLOperand/rank=] if {{MLArgMinMaxOptions/keepDimensions}} is true or the {{MLGraphBuilder/argMin(input, axis, options)/input}}'s [=MLOperand/rank=] - 1 if {{MLArgMinMaxOptions/keepDimensions}} is false. The values must be of type {{MLArgMinMaxOptions/outputDataType}} in the range [0, N-1] where N is the size of the input dimension specified by {{MLGraphBuilder/argMin(input, axis, options)/axis}}. - - +
Constraints for {{MLGraphBuilder/argMin()}}/{{MLGraphBuilder/argMax()}}
+ @@ -2251,8 +2241,8 @@ partial dictionary MLOpSupportLimits { - - + +
Tensor limits for {{MLGraphBuilder/argMin()}}/{{MLGraphBuilder/argMax()}}
operand
*output*{{MLArgMinMaxOptions/outputDataType}}{{input}}'s [=MLOperand/rank=] - 1 to {{input}}'s [=MLOperand/rank=]{{MLOperandDataType/"int32"}}, {{MLOperandDataType/"int64"}}[=/any rank|N=]
@@ -2272,6 +2262,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. 1. If |axis| is greater than or equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}. + 1. if |options|.{{MLArgMinMaxOptions/outputDataType}} is not output tensor's [=/allowed data types=] (according to [this table](#tensor-limits-argMin-argMax)), then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/shape=][|axis|] is greater than |options|.{{MLArgMinMaxOptions/outputDataType}}'s maximum value, then [=exception/throw=] a {{TypeError}}. 1. Let |outputShape| be the result of [=MLGraphBuilder/calculating reduction output sizes=] given |input|'s [=MLOperand/shape=], « |axis| », and |options|.{{MLArgMinMaxOptions/keepDimensions}}. If that returns failure, then [=exception/throw=] a {{TypeError}}. 1. Let |desc| be the result of [=creating an MLOperandDescriptor=] given |options|.{{MLArgMinMaxOptions/outputDataType}} and |outputShape|. @@ -2325,7 +2316,7 @@ dictionary MLBatchNormalizationSupportLimits { MLTensorLimits variance; MLTensorLimits scale; MLTensorLimits bias; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -2362,8 +2353,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The batch-normalized N-D tensor of the same shape as {{MLGraphBuilder/batchNormalization(input, mean, variance, options)/input}}. - - +
Constraints for {{MLGraphBuilder/batchNormalization()}}
+ @@ -2431,18 +2422,18 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |mean|, |variance|, |options|.{{MLBatchNormalizationOptions/scale}} (if it [=map/exists=]), and |options|.{{MLBatchNormalizationOptions/bias}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-batchNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-batchNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLBatchNormalizationOptions/axis}} is not in [=the range=] 0 to |input|'s [=MLOperand/rank=], exclusive, then [=exception/throw=] a {{TypeError}}. - 1. If |mean|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-batchNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If |mean|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-batchNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If |mean|'s [=MLOperand/shape=] is not [=list/equal=] to « |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}] », then [=exception/throw=] a {{TypeError}}. - 1. If |variance|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-batchNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If |variance|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-batchNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If |variance|'s [=MLOperand/shape=] is not [=list/equal=] to « |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}] », then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLBatchNormalizationOptions/epsilon}} to the result of [=casting=] |options|.{{MLBatchNormalizationOptions/epsilon}} to |input|'s [=MLOperand/dataType=]. 1. If |options|.{{MLBatchNormalizationOptions/scale}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-batchNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-batchNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}] », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLBatchNormalizationOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-batchNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-batchNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}] », then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |operator| be an [=operator=] for the "batchNormalization" operation, given |input|, |mean|, |variance| and |options|. @@ -2500,8 +2491,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The N-D tensor of the same shape as {{MLGraphBuilder/cast(input, dataType, options)/input}} with each element casted to the target data type. -
Tensor limits for {{MLGraphBuilder/batchNormalization()}}
operand
- +
Constraints for {{MLGraphBuilder/cast()}}
+ @@ -2516,7 +2507,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/cast()}}
operand
*output*{{dataType}}[=/any data type|any=] [=/same rank as|same as=] {{input}}
@@ -2597,6 +2588,7 @@ NOTE: For example, casting -1 from {{MLOperandDataType/"int8"}} to {{MLOperandDa 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. + 1. if |dataType| is not output tensor's [=/allowed data types=] (according to [this table](#tensor-limits-cast)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |operator| be an [=operator=] for the "cast" operation, given |dataType| and |options|. 1. Let |output| be the result of [=copying an MLOperand=] given |input|. @@ -2640,8 +2632,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/clamp(input, options)/input}}. - - +
Constraints for {{MLGraphBuilder/clamp()}}
+ @@ -2726,7 +2718,7 @@ partial interface MLGraphBuilder { dictionary MLConcatSupportLimits { MLTensorLimits inputs; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -2746,8 +2738,8 @@ partial dictionary MLOpSupportLimits { computed as the sum of all the input sizes of the same dimension. -
Tensor limits for {{MLGraphBuilder/clamp()}}
operand
- +
Constraints for {{MLGraphBuilder/concat()}}
+ @@ -2772,7 +2764,7 @@ partial dictionary MLOpSupportLimits { : inputs :: {{MLTensorLimits}} for all input operands. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/concat()}}: @@ -2844,7 +2836,7 @@ dictionary MLConv2dSupportLimits { MLTensorLimits input; MLTensorLimits filter; MLTensorLimits bias; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -2911,8 +2903,8 @@ partial dictionary MLOpSupportLimits { `outputSize = 1 + (inputSize - (filterSize - 1) * dilation - 1 + beginningPadding + endingPadding) / stride` -
Tensor limits for {{MLGraphBuilder/concat()}}
operand
- +
Constraints for {{MLGraphBuilder/conv2d()}}
+ @@ -2951,7 +2943,7 @@ partial dictionary MLOpSupportLimits { : bias :: {{MLTensorLimits}} for bias operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/conv2d()}}: @@ -2989,10 +2981,10 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |filter|, and |options|.{{MLConv2dOptions/bias}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-conv2d)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-conv2d)), then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/rank=] is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. If |filter|'s [=MLOperand/rank=] is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. - 1. If |filter|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-conv2d)), then [=exception/throw=] a {{TypeError}}. + 1. If |filter|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-conv2d)), then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConv2dOptions/padding}} does not [=map/exist=], then set it to the [=/list=] « 0, 0, 0, 0 ». 1. Otherwise, if |options|.{{MLConv2dOptions/padding}}'s [=list/size=] is not 4, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConv2dOptions/strides}} does not [=map/exist=], then set it to the [=/list=] « 1, 1 ». @@ -3027,7 +3019,7 @@ partial dictionary MLOpSupportLimits { 1. Otherwise, if |inputChannels| / |options|.{{MLConv2dOptions/groups}} is not equal to |filterInputChannels|, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConv2dOptions/bias}} [=map/exists=], then: 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |outputChannels| », then [=exception/throw=] a {{TypeError}}. - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-conv2d)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-conv2d)), then [=exception/throw=] a {{TypeError}}. 1. Let « |outputHeight|, |outputWidth| » be the result of [=MLGraphBuilder/calculating conv2d output sizes=] given |inputHeight|, |inputWidth|, |filterHeight|, |filterWidth|, |options|.{{MLConv2dOptions/padding}}, |options|.{{MLConv2dOptions/strides}}, and |options|.{{MLConv2dOptions/dilations}}. 1. Set |outputHeight| to floor( |outputHeight| ). 1. Set |outputWidth| to floor( |outputWidth| ). @@ -3156,8 +3148,8 @@ partial dictionary MLOpSupportLimits { `outputSize = (inputSize - 1) * stride + (filterSize - 1) * dilation + 1 - beginningPadding - endingPadding + outputPadding` -
Tensor limits for {{MLGraphBuilder/conv2d()}}
operand
- +
Constraints for {{MLGraphBuilder/convTranspose2d()}}
+ @@ -3209,9 +3201,9 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |filter|, and |options|.{{MLConvTranspose2dOptions/bias}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/rank=] is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-convTranspose2d)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-convTranspose2d)), then [=exception/throw=] a {{TypeError}}. 1. If |filter|'s [=MLOperand/rank=] is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. - 1. If |filter|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-convTranspose2d)), then [=exception/throw=] a {{TypeError}}. + 1. If |filter|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-convTranspose2d)), then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConvTranspose2dOptions/padding}} does not [=map/exist=], then set it to the [=/list=] « 0, 0, 0, 0 ». 1. Otherwise, if |options|.{{MLConvTranspose2dOptions/padding}}'s [=list/size=] is not 4, then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConvTranspose2dOptions/strides}} does not [=map/exist=], then set it to the [=/list=] « 1, 1 ». @@ -3251,7 +3243,7 @@ partial dictionary MLOpSupportLimits { 1. If |outputChannels| is not a [=valid dimension=], then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLConvTranspose2dOptions/bias}} [=map/exists=], then: 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |outputChannels| », then [=exception/throw=] a {{TypeError}}. - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-convTranspose2d)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-convTranspose2d)), then [=exception/throw=] a {{TypeError}}. 1. Let |calculatedOutputHeight| be the result of [=MLGraphBuilder/calculating convtranspose output size=] given |inputHeight|, |filterHeight|, |padding|[0], |padding|[1], |strides|[0] and |dilations|[0]. 1. Let |calculatedOutputWidth| be the result of [=MLGraphBuilder/calculating convtranspose output size=] given |inputWidth|, |filterWidth|, |padding|[2], |padding|[3], |strides|[1] and |dilations|[1]. 1. If |options|.{{MLConvTranspose2dOptions/outputSizes}} [=map/exists=], then: @@ -3300,8 +3292,8 @@ partial dictionary MLOpSupportLimits { }; -
Tensor limits for {{MLGraphBuilder/convTranspose2d()}}
operand
- +
Constraints for {{MLGraphBuilder/cumulativeSum()}}
+ @@ -3354,7 +3346,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-cumulativesum)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-cumulativesum)), then [=exception/throw=] a {{TypeError}}. 1. If |axis| is greater than or equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. @@ -3413,8 +3405,8 @@ partial dictionary MLOpSupportLimits { - *pow*: Compute the values of the values of the first input tensor to the power of the values of the second input tensor, element-wise. -
Tensor limits for {{MLGraphBuilder/cumulativeSum()}}
operand
- +
Constraints for element-wise binary options
+ @@ -3435,7 +3427,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for element-wise binary options
operand
*output* [=/same type as|same as=] {{a}}maximum of {{a}}'s [=MLOperand/rank=] and {{b}}'s [=MLOperand/rank=][=/any rank|N=]
@@ -3572,7 +3564,7 @@ partial interface MLGraphBuilder { dictionary MLLogicalNotSupportLimits { MLTensorLimits a; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -3600,8 +3592,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output tensor that contains the result of element-wise comparison of the two input tensors. - - +
Constraints for element-wise logical options
+ @@ -3622,7 +3614,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for element-wise logical options
operand
*output* {{MLOperandDataType/"uint8"}}maximum of {{a}}'s [=MLOperand/rank=] and {{b}}'s [=MLOperand/rank=][=/any rank|N=]
@@ -3632,7 +3624,7 @@ partial dictionary MLOpSupportLimits { : a :: {{MLTensorLimits}} for a operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following members for element-wise logical operations: @@ -3849,8 +3841,8 @@ partial dictionary MLOpSupportLimits { tensor is the same as the shape of input tensor. - - +
Constraints for element-wise unary options
+ @@ -4087,7 +4079,7 @@ dictionary MLQuantizeDequantizeLinearSupportLimits { MLTensorLimits input; MLTensorLimits scale; MLTensorLimits zeroPoint; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -4105,8 +4097,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output tensor that contains the dequantized values. -
Tensor limits for element-wise unary options
operand
- +
Constraints for {{MLGraphBuilder/dequantizeLinear()}}
+ @@ -4145,7 +4137,7 @@ partial dictionary MLOpSupportLimits { : zeroPoint :: {{MLTensorLimits}} for zeroPoint operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/dequantizeLinear()}}: @@ -4160,9 +4152,9 @@ partial dictionary MLOpSupportLimits { 1. If [=this=].{{MLGraphBuilder/[[hasBuilt]]}} is true, then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |scale|, and |zeroPoint| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-dequantizelinear)), then [=exception/throw=] a {{TypeError}}. - 1. If |scale|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-dequantizelinear)), then [=exception/throw=] a {{TypeError}}. - 1. If |zeroPoint|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-dequantizelinear)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-dequantizelinear)), then [=exception/throw=] a {{TypeError}}. + 1. If |scale|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-dequantizelinear)), then [=exception/throw=] a {{TypeError}}. + 1. If |zeroPoint|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-dequantizelinear)), then [=exception/throw=] a {{TypeError}}. 1. If |scale|'s [=MLOperand/rank=] or |zeroPoint|'s [=MLOperand/rank=] is not equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}. 1. If |scale|'s [=MLOperand/shape=] is not [=list/equal=] to |zeroPoint|'s [=MLOperand/shape=], then [=exception/throw=] a {{TypeError}}. 1. If [=blockwise broadcasting=] |scale|'s [=MLOperand/shape=] and |input|'s [=MLOperand/shape=] returns false, then [=exception/throw=] a {{TypeError}}. @@ -4279,8 +4271,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output tensor that contains the quantized values. -
Tensor limits for {{MLGraphBuilder/dequantizeLinear()}}
operand
- +
Constraints for {{MLGraphBuilder/quantizeLinear()}}
+ @@ -4323,9 +4315,9 @@ partial dictionary MLOpSupportLimits { 1. If [=this=].{{MLGraphBuilder/[[hasBuilt]]}} is true, then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |scale|, and |zeroPoint| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-quantizelinear)), then [=exception/throw=] a {{TypeError}}. - 1. If |scale|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-quantizelinear)), then [=exception/throw=] a {{TypeError}}. - 1. If |zeroPoint|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-quantizelinear)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-quantizelinear)), then [=exception/throw=] a {{TypeError}}. + 1. If |scale|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-quantizelinear)), then [=exception/throw=] a {{TypeError}}. + 1. If |zeroPoint|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-quantizelinear)), then [=exception/throw=] a {{TypeError}}. 1. If |scale|'s [=MLOperand/rank=] or |zeroPoint|'s [=MLOperand/rank=] is not equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}. 1. If |scale|'s [=MLOperand/shape=] is not [=list/equal=] to |zeroPoint|'s [=MLOperand/shape=], then [=exception/throw=] a {{TypeError}}. 1. If [=blockwise broadcasting=] |scale|'s [=MLOperand/shape=] and |input|'s [=MLOperand/shape=] returns false, then [=exception/throw=] a {{TypeError}}. @@ -4398,8 +4390,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/elu(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/quantizeLinear()}}
operand
- +
Constraints for {{MLGraphBuilder/elu()}}
+ @@ -4431,7 +4423,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-elu)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-elu)), then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLEluOptions/alpha}} to the result of [=casting=] |options|.{{MLEluOptions/alpha}} to |input|'s [=MLOperand/dataType=]. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. @@ -4483,8 +4475,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The tensor with expanded size shape. -
Tensor limits for {{MLGraphBuilder/elu()}}
operand
- +
Constraints for {{MLGraphBuilder/expand()}}
+ @@ -4500,7 +4492,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/expand()}}
operand
*output* [=/same type as|same as=] {{input}}{{newShape}}'s [=list/size=][=/any rank|N=]
@@ -4518,6 +4510,7 @@ partial dictionary MLOpSupportLimits { 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. 1. Let |outputShape| be the result of [=unidirectionally broadcasting=] |input|'s [=MLOperand/shape=] and |newShape|. 1. If that returns failure, then [=exception/throw=] a {{TypeError}}. + 1. If |outputShape|'s [=list/size=] is not output tensor's [=/allowed ranks=] (according to [this table](#tensor-limits-expand)), then [=exception/throw=] a {{TypeError}}. 1. Let |outputDescriptor| be the result of [=creating an MLOperandDescriptor=] given |input|'s [=MLOperand/dataType=] and |outputShape|. 1. *Make graph connections:* 1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |outputDescriptor|. @@ -4544,7 +4537,7 @@ partial interface MLGraphBuilder { dictionary MLGatherSupportLimits { MLTensorLimits input; MLTensorLimits indices; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -4572,8 +4565,8 @@ partial dictionary MLOpSupportLimits { The {{MLGraphBuilder/gather(input, indices, options)/indices}} parameter to {{MLGraphBuilder/gather()}} can not be clamped to the allowed range when the graph is built because the inputs are not known until execution. Implementations can introduce {{MLGraphBuilder/clamp()}} in the compiled graph if the specified clamping behavior is not provided by the underlying platform. Similarly, if the underlying platform does not support negative indices, the implementation can introduce operations in the compiled graph to transform a negative index from the end of the dimension into a positive index. - - +
Constraints for {{MLGraphBuilder/gather()}}
+ @@ -4594,7 +4587,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/gather()}}
operand
*output* [=/same type as|same as=] {{input}}{{input}}'s [=MLOperand/rank=] + {{indices}}'s [=MLOperand/rank=] - 1[=/any rank|N=]
@@ -4605,7 +4598,7 @@ partial dictionary MLOpSupportLimits { : indices :: {{MLTensorLimits}} for indices operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/gather()}}: @@ -4620,7 +4613,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |indices| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |indices|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gather)), then [=exception/throw=] a {{TypeError}}. + 1. If |indices|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gather)), then [=exception/throw=] a {{TypeError}}. 1. Let |inputShape| be |input|'s [=MLOperand/shape=] and |inputRank| be |input|'s [=MLOperand/rank=]. 1. Let |indicesShape| be |indices|'s [=MLOperand/shape=]. 1. Let |axis| be |options|.{{MLGatherOptions/axis}}. @@ -4736,8 +4729,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to {{MLGraphBuilder/gatherElements(input, indices, options)/input}}'s [=MLOperand/rank=]. - - +
Constraints for {{MLGraphBuilder/gatherElements()}}
+ @@ -4778,7 +4771,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |indices| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |indices|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gatherelements)), then [=exception/throw=] a {{TypeError}}. + 1. If |indices|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gatherelements)), then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input| or |indices| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Let |axis| be |options|.{{MLGatherOptions/axis}}. 1. If |axis| is greater than or equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}. @@ -4899,8 +4892,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the {{MLGraphBuilder/gatherND(input, indices, options)/input}}'s [=MLOperand/rank=] + {{MLGraphBuilder/gatherND(input, indices, options)/indices}}'s [=MLOperand/rank=] - {{MLGraphBuilder/gatherND(input, indices, options)/indices}}'s [=MLOperand/shape=][-1] - 1. -
Tensor limits for {{MLGraphBuilder/gatherElements()}}
operand
- +
Constraints for {{MLGraphBuilder/gatherND()}}
+ @@ -4921,7 +4914,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/gatherND()}}
operand
*output* [=/same type as|same as=] {{input}}{{input}}'s [=MLOperand/rank=] + {{indices}}'s [=MLOperand/rank=] - {{indices}}'s [=MLOperand/shape=][-1] - 1[=/any rank|N=]
@@ -4941,7 +4934,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |indices| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |indices|'s [=MLOperand/dataType=]'s is not one of the [=/allowed data types=] (according to [this table](#constraints-gathernd)), then [=exception/throw=] a {{TypeError}}. + 1. If |indices|'s [=MLOperand/dataType=]'s is not one of the [=/allowed data types=] (according to [this table](#tensor-limits-gathernd)), then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input| or |indices| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Let |inputShape| be |input|'s [=MLOperand/shape=] and |inputRank| be |input|'s [=MLOperand/rank=]. 1. Let |indicesShape| be |indices|'s [=MLOperand/shape=] and |indicesRank| be |indices|'s [=MLOperand/rank=]. @@ -5091,8 +5084,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/gelu(input, options)/input}}. - - +
Constraints for {{MLGraphBuilder/gelu()}}
+ @@ -5124,7 +5117,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gelu)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gelu)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "gelu" operation given |options|. @@ -5172,7 +5165,7 @@ dictionary MLGemmSupportLimits { MLTensorLimits a; MLTensorLimits b; MLTensorLimits c; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -5212,8 +5205,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output 2-D tensor of shape *[M, N]* that contains the calculated product of all the inputs. -
Tensor limits for {{MLGraphBuilder/gelu()}}
operand
- +
Constraints for {{MLGraphBuilder/gemm()}}
+ @@ -5252,7 +5245,7 @@ partial dictionary MLOpSupportLimits { : c :: {{MLTensorLimits}} for c operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gemm()}}: @@ -5267,7 +5260,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |a| and |b| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |a| or |b| is not one of its [=/allowed data types=] (according to [this table](#constraints-gemm)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |a| or |b| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gemm)), then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |a| or |b| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLGemmOptions/alpha}} to the result of [=casting=] |options|.{{MLGemmOptions/alpha}} to |a|'s [=MLOperand/dataType=]. 1. Set |options|.{{MLGemmOptions/beta}} to the result of [=casting=] |options|.{{MLGemmOptions/beta}} to |a|'s [=MLOperand/dataType=]. @@ -5278,7 +5271,7 @@ partial dictionary MLOpSupportLimits { 1. If |shapeA|[1] is not equal to |shapeB|[0], then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLGemmOptions/c}} [=map/exists=], then: 1. If it is not [=unidirectionally broadcastable=] to the shape « |shapeA|[0], |shapeB|[1] », then [=exception/throw=] a {{TypeError}}. - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gemm)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gemm)), then [=exception/throw=] a {{TypeError}}. 1. Let |desc| be the result of [=creating an MLOperandDescriptor=] given |a|'s [=MLOperand/dataType=] and « |shapeA|[0], |shapeB|[1] ». 1. *Make graph connections:* 1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |desc|. @@ -5363,7 +5356,8 @@ dictionary MLGruSupportLimits { MLTensorLimits bias; MLTensorLimits recurrentBias; MLTensorLimits initialHiddenState; - MLDataTypeLimits outputs; + MLTensorLimits output0; + MLTensorLimits output1; }; partial dictionary MLOpSupportLimits { @@ -5419,8 +5413,8 @@ partial dictionary MLOpSupportLimits { **Returns:** [=sequence=]<{{MLOperand}}>. The first element is a 3-D tensor of shape *[numDirections, batchSize, hiddenSize]*, the cell output from the last time step of the network. Additionally, if {{MLGruOptions/returnSequence}} is set to true, the second element is the 4-D output tensor of shape *[steps, numDirections, batchSize, hiddenSize]* containing every cell outputs from each time step in the temporal sequence. -
Tensor limits for {{MLGraphBuilder/gemm()}}
operand
- +
Constraints for {{MLGraphBuilder/gru()}}
+ @@ -5484,8 +5478,10 @@ partial dictionary MLOpSupportLimits { :: {{MLTensorLimits}} for recurrentBias operand. : initialHiddenState :: {{MLTensorLimits}} for initialHiddenState operand. - : outputs - :: {{MLDataTypeLimits}} for all the output operands. + : output0 + :: {{MLTensorLimits}} for all the output operands[0]. + : output1 + :: {{MLTensorLimits}} for all the output operands[1]. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gru()}}: @@ -5500,7 +5496,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |weight|, |recurrentWeight|, |options|.{{MLGruOptions/bias}} (if it [=map/exists=]), |options|.{{MLGruOptions/recurrentBias}} (if it [=map/exists=]), and |options|.{{MLGruOptions/initialHiddenState}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |input|, |weight| or |recurrentWeight| is not one of its [=/allowed data types=] (according to [this table](#constraints-gru)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |input|, |weight| or |recurrentWeight| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gru)), then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input|, |weight| or |recurrentWeight| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/shape=][0] is not equal to |steps|, then [=exception/throw=] a {{TypeError}}. 1. Let |batchSize| be |input|'s [=MLOperand/shape=][1]. @@ -5514,13 +5510,13 @@ partial dictionary MLOpSupportLimits { Some underlying platforms operate on a single bias tensor which is a concatenation of {{MLGruOptions/bias}} and {{MLGruOptions/recurrentBias}}. Therefore, 3 * |hiddenSize| + 3 * |hiddenSize| also needs to be a [=valid dimension=]. 1. If |options|.{{MLGruOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gru)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gru)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, 3 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLGruOptions/recurrentBias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gru)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gru)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, 3 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLGruOptions/initialHiddenState}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gru)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gru)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, |batchSize|, |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLGruOptions/activations}} [=map/exists=], then: 1. If its [=list/size=] is not 2, then [=exception/throw=] a {{TypeError}}. @@ -5704,7 +5700,7 @@ dictionary MLGruCellSupportLimits { MLTensorLimits hiddenState; MLTensorLimits bias; MLTensorLimits recurrentBias; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -5747,8 +5743,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The 2-D tensor of shape *[batchSize, hiddenSize]*, the cell output hidden state of a single time step of the recurrent network. -
Tensor limits for {{MLGraphBuilder/gru()}}
operand
- +
Constraints for {{MLGraphBuilder/gruCell()}}
+ @@ -5803,7 +5799,7 @@ partial dictionary MLOpSupportLimits { : recurrentBias :: {{MLTensorLimits}} for recurrentBias operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/gruCell()}}: @@ -5818,8 +5814,8 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |weight|, |recurrentWeight|, |hiddenState|, |options|.{{MLGruCellOptions/bias}} (if it [=map/exists=]), and |options|.{{MLGruCellOptions/recurrentBias}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |input|, |weight|, |recurrentWeight|, or |hiddenState| is not one of its [=/allowed data types=] (according to [this table](#constraints-gruCell)), then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/rank=] of any of |input|, |weight|, |recurrentWeight| or |hiddenState| is not its [=/allowed ranks=] (according to [this table](#constraints-gruCell)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |input|, |weight|, |recurrentWeight|, or |hiddenState| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gruCell)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/rank=] of any of |input|, |weight|, |recurrentWeight| or |hiddenState| is not its [=/allowed ranks=] (according to [this table](#tensor-limits-gruCell)), then [=exception/throw=] a {{TypeError}}. 1. Let |batchSize| be |input|'s [=MLOperand/shape=][0]. 1. Let |inputSize| be |input|'s [=MLOperand/shape=][1]. 1. If |weight|'s [=MLOperand/shape=] is not [=list/equal=] to « 3 * |hiddenSize|, |inputSize| », then [=exception/throw=] a {{TypeError}}. @@ -5831,10 +5827,10 @@ partial dictionary MLOpSupportLimits { Some underlying platforms operate on a single bias tensor which is a concatenation of {{MLGruCellOptions/bias}} and {{MLGruCellOptions/recurrentBias}}. Therefore, 3 * |hiddenSize| + 3 * |hiddenSize| also needs to be a [=valid dimension=]. 1. If |options|.{{MLGruCellOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gruCell)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gruCell)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « 3 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLGruCellOptions/recurrentBias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-gruCell)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-gruCell)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « 3 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLGruCellOptions/activations}} [=map/exists=], then: 1. If its [=list/size=] is not 2, then [=exception/throw=] a {{TypeError}}. @@ -5994,8 +5990,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/hardSigmoid(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/gruCell()}}
operand
- +
Constraints for {{MLGraphBuilder/hardSigmoid()}}
+ @@ -6027,7 +6023,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-hardSigmoid)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-hardSigmoid)), then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLHardSigmoidOptions/alpha}} to the result of [=casting=] |options|.{{MLHardSigmoidOptions/alpha}} to |input|'s [=MLOperand/dataType=]. 1. Set |options|.{{MLHardSigmoidOptions/beta}} to the result of [=casting=] |options|.{{MLHardSigmoidOptions/beta}} to |input|'s [=MLOperand/dataType=]. 1. *Make graph connections:* @@ -6079,8 +6075,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/hardSwish(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/hardSigmoid()}}
operand
- +
Constraints for {{MLGraphBuilder/hardSwish()}}
+ @@ -6112,7 +6108,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-hardSwish)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-hardSwish)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "hardSwish" operation, given |options|. @@ -6163,7 +6159,7 @@ dictionary MLNormalizationSupportLimits { MLTensorLimits input; MLTensorLimits scale; MLTensorLimits bias; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -6199,8 +6195,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The instance-normalized 4-D tensor of the same shape as {{MLGraphBuilder/instanceNormalization(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/hardSwish()}}
operand
- +
Constraints for {{MLGraphBuilder/instanceNormalization()}}
+ @@ -6239,7 +6235,7 @@ partial dictionary MLOpSupportLimits { : bias :: {{MLTensorLimits}} for bias operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/instanceNormalization()}}: @@ -6254,15 +6250,15 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |options|.{{MLInstanceNormalizationOptions/scale}} (if it [=map/exists=]), and |options|.{{MLInstanceNormalizationOptions/bias}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-instanceNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-instanceNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/rank=] is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLInstanceNormalizationOptions/epsilon}} to the result of [=casting=] |options|.{{MLInstanceNormalizationOptions/epsilon}} to |input|'s [=MLOperand/dataType=]. 1. Let |axis| be 1 if |options|.{{MLInstanceNormalizationOptions/layout}} is {{MLInputOperandLayout/"nchw"}}, and 3 otherwise. 1. If |options|.{{MLInstanceNormalizationOptions/scale}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-instanceNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-instanceNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |input|'s [=MLOperand/shape=][|axis|] », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLInstanceNormalizationOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-instanceNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-instanceNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |input|'s [=MLOperand/shape=][|axis|] », then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. @@ -6352,8 +6348,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The layer-normalized N-D tensor of the same shape as {{MLGraphBuilder/layerNormalization(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/instanceNormalization()}}
operand
- +
Constraints for {{MLGraphBuilder/layerNormalization()}}
+ @@ -6369,12 +6365,12 @@ partial dictionary MLOpSupportLimits { - + - + @@ -6395,15 +6391,15 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |options|.{{MLLayerNormalizationOptions/scale}} (if it [=map/exists=]), and |options|.{{MLLayerNormalizationOptions/bias}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-layerNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-layerNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLayerNormalizationOptions/axes}} does not [=map/exist=], then set |options|.{{MLLayerNormalizationOptions/axes}} to a new [=/list=], either [=the range=] from 1 to |input|'s [=MLOperand/rank=], exclusive, if |input|'s [=MLOperand/rank=] is greater than 1, or an empty [=/list=] otherwise. 1. Otherwise, if |options|.{{MLLayerNormalizationOptions/axes}} contains duplicate values, or if any of its [=list/items=] is not in [=the range=] 0 to |input|'s [=MLOperand/rank=], exclusive, then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLLayerNormalizationOptions/epsilon}} to the result of [=casting=] |options|.{{MLLayerNormalizationOptions/epsilon}} to |input|'s [=MLOperand/dataType=]. 1. If |options|.{{MLLayerNormalizationOptions/scale}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-layerNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-layerNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/rank=] is not equal to |options|.{{MLLayerNormalizationOptions/axes}}'s [=list/size=], then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLayerNormalizationOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-layerNormalization)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-layerNormalization)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/rank=] is not equal to |options|.{{MLLayerNormalizationOptions/axes}}'s [=list/size=], then [=exception/throw=] a {{TypeError}}. 1. [=list/For each=] |index| in [=the range=] 0 to |options|.{{MLLayerNormalizationOptions/axes}}'s [=list/size=], exclusive: 1. Let |axis| be |options|.{{MLLayerNormalizationOptions/axes}}[|index|]. @@ -6487,8 +6483,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/leakyRelu(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/layerNormalization()}}
operand
{{MLLayerNormalizationOptions/scale}} [=/same type as|same as=] {{input}}0 to {{input}}'s [=MLOperand/rank=][=/any rank|N=]
{{MLLayerNormalizationOptions/bias}} [=/same type as|same as=] {{input}}0 to {{input}}'s [=MLOperand/rank=][=/any rank|N=]
*output*
- +
Constraints for {{MLGraphBuilder/leakyRelu()}}
+ @@ -6520,7 +6516,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-leakyRelu)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-leakyRelu)), then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLLeakyReluOptions/alpha}} to the result of [=casting=] |options|.{{MLLeakyReluOptions/alpha}} to |input|'s [=MLOperand/dataType=]. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. @@ -6585,8 +6581,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/linear(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/leakyRelu()}}
operand
- +
Constraints for {{MLGraphBuilder/linear()}}
+ @@ -6618,7 +6614,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-linear)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-linear)), then [=exception/throw=] a {{TypeError}}. 1. Set |options|.{{MLLinearOptions/alpha}} to the result of [=casting=] |options|.{{MLLinearOptions/alpha}} to |input|'s [=MLOperand/dataType=]. 1. Set |options|.{{MLLinearOptions/beta}} to the result of [=casting=] |options|.{{MLLinearOptions/beta}} to |input|'s [=MLOperand/dataType=]. 1. *Make graph connections:* @@ -6684,7 +6680,9 @@ dictionary MLLstmSupportLimits { MLTensorLimits peepholeWeight; MLTensorLimits initialHiddenState; MLTensorLimits initialCellState; - MLDataTypeLimits outputs; + MLTensorLimits output0; + MLTensorLimits output1; + MLTensorLimits output2; }; partial dictionary MLOpSupportLimits { @@ -6744,8 +6742,8 @@ partial dictionary MLOpSupportLimits { **Returns:** [=sequence=]<{{MLOperand}}>. The first element is a 3-D tensor of shape *[numDirections, batchSize, hiddenSize]*, the output hidden state from the last time step of the network. The second element is a 3-D tensor of shape *[numDirections, batchSize, hiddenSize]*, the output cell state from the last time step of the network. Additionally, if {{MLLstmOptions/returnSequence}} is set to true, the third element is the 4-D output tensor of shape *[steps, numDirections, batchSize, hiddenSize]* containing every output from each time step in the temporal sequence. -
Tensor limits for {{MLGraphBuilder/linear()}}
operand
- +
Constraints for {{MLGraphBuilder/lstm()}}
+ @@ -6828,8 +6826,12 @@ partial dictionary MLOpSupportLimits { :: {{MLTensorLimits}} for initialHiddenState operand. : initialCellState :: {{MLTensorLimits}} for initialCellState operand. - : outputs - :: {{MLDataTypeLimits}} for all the output operands. + : output0 + :: {{MLTensorLimits}} for all the output operands[0]. + : output1 + :: {{MLTensorLimits}} for all the output operands[1]. + : output2 + :: {{MLTensorLimits}} for all the output operands[2]. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstm()}}: @@ -6845,7 +6847,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |weight|, |recurrentWeight|, |options|.{{MLLstmOptions/bias}} (if it [=map/exists=]), |options|.{{MLLstmOptions/recurrentBias}} (if it [=map/exists=]), |options|.{{MLLstmOptions/peepholeWeight}} (if it [=map/exists=]), |options|.{{MLLstmOptions/initialHiddenState}} (if it [=map/exists=]), and |options|.{{MLLstmOptions/initialCellState}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. 1. Let |numDirections| be 2 if |options|.{{MLLstmOptions/direction}} is {{MLRecurrentNetworkDirection/"both"}}, or 1 otherwise. - 1. If the [=MLOperand/dataType=] of any of |input|, |weight| or |recurrentWeight| is not one of its [=/allowed data types=] (according to [this table](#constraints-lstm)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |input|, |weight| or |recurrentWeight| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstm)), then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input|, |weight| or |recurrentWeight| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. If |steps| is 0, then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/shape=][0] is not equal to |steps|, then [=exception/throw=] a {{TypeError}}. @@ -6859,19 +6861,19 @@ partial dictionary MLOpSupportLimits { Some underlying platforms operate on a single bias tensor which is a concatenation of {{MLLstmOptions/bias}} and {{MLLstmOptions/recurrentBias}}. Therefore, 4 * |hiddenSize| + 4 * |hiddenSize| also needs to be a [=valid dimension=]. 1. If |options|.{{MLLstmOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstm)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstm)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, 4 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmOptions/recurrentBias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstm)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstm)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, 4 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmOptions/peepholeWeight}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstm)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstm)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, 3 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmOptions/initialHiddenState}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstm)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstm)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, |batchSize|, |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmOptions/initialCellState}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstm)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstm)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « |numDirections|, |batchSize|, |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmOptions/activations}} [=map/exists=], then: 1. If its [=list/size=] is not 3, then [=exception/throw=] a {{TypeError}}. @@ -7093,7 +7095,8 @@ dictionary MLLstmCellSupportLimits { MLTensorLimits bias; MLTensorLimits recurrentBias; MLTensorLimits peepholeWeight; - MLDataTypeLimits outputs; + MLTensorLimits output0; + MLTensorLimits output1; }; partial dictionary MLOpSupportLimits { @@ -7137,8 +7140,8 @@ partial dictionary MLOpSupportLimits { **Returns:** [=sequence=]<{{MLOperand}}>. The first element is the output hidden state of the current time step of the recurrent network. The following element is the output cell state. Both elements are 2-D tensors of shape *[batchSize, hiddenSize]*. -
Tensor limits for {{MLGraphBuilder/lstm()}}
operand
- +
Constraints for {{MLGraphBuilder/lstmCell()}}
+ @@ -7216,8 +7219,10 @@ partial dictionary MLOpSupportLimits { :: {{MLTensorLimits}} for recurrentBias operand. : peepholeWeight :: {{MLTensorLimits}} for peepholeWeight operand. - : outputs - :: {{MLDataTypeLimits}} for all the output operands. + : output0 + :: {{MLTensorLimits}} for all the output operands[0]. + : output1 + :: {{MLTensorLimits}} for all the output operands[1]. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/lstmCell()}}: @@ -7232,7 +7237,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |weight|, |recurrentWeight|, |hiddenState|, |cellState|, |options|.{{MLLstmCellOptions/bias}} (if it [=map/exists=]), |options|.{{MLLstmCellOptions/recurrentBias}} (if it [=map/exists=]), and |options|.{{MLLstmCellOptions/peepholeWeight}} (if it [=map/exists=]) returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |input|, |weight|, |recurrentWeight|, |hiddenState| or |cellState| is not one of its [=/allowed data types=] (according to [this table](#constraints-lstmCell)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |input|, |weight|, |recurrentWeight|, |hiddenState| or |cellState| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstmCell)), then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input|, |weight|, |recurrentWeight|, |hiddenState| or |cellState| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Let |batchSize| be |input|'s [=MLOperand/shape=][0]. 1. Let |inputSize| be |input|'s [=MLOperand/shape=][1]. @@ -7246,13 +7251,13 @@ partial dictionary MLOpSupportLimits { Some underlying platforms operate on a single bias tensor which is a concatenation of {{MLLstmCellOptions/bias}} and {{MLLstmCellOptions/recurrentBias}}. Therefore, 4 * |hiddenSize| + 4 * |hiddenSize| also needs to be a [=valid dimension=]. 1. If |options|.{{MLLstmCellOptions/bias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstmCell)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstmCell)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « 4 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmCellOptions/recurrentBias}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstmCell)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstmCell)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « 4 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmCellOptions/peepholeWeight}} [=map/exists=], then: - 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-lstmCell)), then [=exception/throw=] a {{TypeError}}. + 1. If its [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-lstmCell)), then [=exception/throw=] a {{TypeError}}. 1. If its [=MLOperand/shape=] is not [=list/equal=] to « 3 * |hiddenSize| », then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLLstmCellOptions/activations}} [=map/exists=], then: 1. If its [=list/size=] is not 3, then [=exception/throw=] a {{TypeError}}. @@ -7431,8 +7436,8 @@ partial dictionary MLOpSupportLimits { - If either {{MLGraphBuilder/matmul(a, b, options)/a}} or {{MLGraphBuilder/matmul(a, b, options)/b}} is `N`-dimensional where `N > 2`, it is treated as a stack of matrices with dimensions corresponding to the last two indices. The matrix multiplication will be [=broadcast=] according to [[!numpy-broadcasting-rule]]. The shapes of {{MLGraphBuilder/matmul(a, b, options)/a}} and {{MLGraphBuilder/matmul(a, b, options)/b}}, except the last two dimensions, must be [=bidirectionally broadcastable=]. The output is a `N`-dimensional tensor whose rank is the maximum [=MLOperand/rank=] of the input tensors. For each dimension, except the last two, of the output tensor, its size is the maximum size along that dimension of the input tensors. -
Tensor limits for {{MLGraphBuilder/lstmCell()}}
operand
- +
Constraints for {{MLGraphBuilder/matmul()}}
+ @@ -7443,17 +7448,17 @@ partial dictionary MLOpSupportLimits { - + - + - +
Tensor limits for {{MLGraphBuilder/matmul()}}
operand
{{a}} {{MLOperandDataType/"float32"}}, {{MLOperandDataType/"float16"}}2 or greater2 to [=/any rank|N=]
{{b}} [=/same type as|same as=] {{a}}2 or greater2 or [=/any rank|N=]
*output* [=/same type as|same as=] {{a}}maximum of {{a}}'s [=MLOperand/rank=] and {{b}}'s [=MLOperand/rank=]2 or [=/any rank|N=]
@@ -7469,7 +7474,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |a| and |b| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |a| or |b| is not one of its [=/allowed data types=] (according to [this table](#constraints-matmul)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |a| or |b| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-matmul)), then [=exception/throw=] a {{TypeError}}. 1. *Calculate the output shape:* 1. Let |shapeA| be a [=list/clone=] of |a|'s [=MLOperand/shape=]. 1. Let |rankA| be |a|'s [=MLOperand/rank=]. @@ -7544,8 +7549,8 @@ partial dictionary MLOpSupportLimits { `output size = beginning padding + input size + ending padding` - - +
Constraints for {{MLGraphBuilder/pad()}}
+ @@ -7741,8 +7746,8 @@ partial dictionary MLOpSupportLimits { `output size = ceil(1 + (input size - filter size + beginning padding + ending padding) / stride)` -
Tensor limits for {{MLGraphBuilder/pad()}}
operand
- +
Constraints for pooling operations
+ @@ -7898,7 +7903,7 @@ partial interface MLGraphBuilder { dictionary MLPreluSupportLimits { MLTensorLimits input; MLTensorLimits slope; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -7913,11 +7918,11 @@ partial dictionary MLOpSupportLimits { - options: an {{MLOperatorOptions}}. Specifies the optional parameters of the operation. **Returns:** - - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/prelu(input, slope, options)/input}}. + - an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the maximum of {{MLGraphBuilder/prelu(input, slope, options)/input}}'s [=MLOperand/rank=] and {{MLGraphBuilder/prelu(input, slope, options)/slope}}'s [=MLOperand/rank=]. -
Tensor limits for pooling operations
operand
- +
Constraints for {{MLGraphBuilder/prelu()}}
+ @@ -7937,7 +7942,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/prelu()}}
operand
*output* [=/same type as|same as=] {{input}}maximum of {{input}}'s [=MLOperand/rank=] and {{slope}}'s [=MLOperand/rank=][=/any rank|N=]
@@ -7948,7 +7953,7 @@ partial dictionary MLOpSupportLimits { : slope :: {{MLTensorLimits}} for slope operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/prelu()}}: @@ -7963,7 +7968,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |slope| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |input| or |slope| is not one of its [=/allowed data types=] (according to [this table](#constraints-prelu)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |input| or |slope| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-prelu)), then [=exception/throw=] a {{TypeError}}. 1. Let |outputShape| be the result of [=bidirectionally broadcasting=] |slope|'s [=MLOperand/shape=] and |input|'s [=MLOperand/shape=]. 1. If that returns failure, then [=exception/throw=] a {{TypeError}}. 1. Let |descriptor| be the result of [=creating an MLOperandDescriptor=] given |input|'s [=MLOperand/dataType=] and |outputShape|. @@ -8050,11 +8055,11 @@ partial dictionary MLOpSupportLimits { - input: an {{MLOperand}}. The input tensor. - options: an optional {{MLReduceOptions}}. The optional parameters of the operation. - **Returns:** an {{MLOperand}}. The reduced output tensor. If the input operand is a scalar, the reduction function is applied to the scalar value, and the output is also a scalar. + **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] in the range 0 to {{MLGraphBuilder/reduceL1(input, options)/input}}'s [=MLOperand/rank=], inclusive, depending on {{MLReduceOptions/axes}} and {{MLReduceOptions/keepDimensions}}. If the input operand is a scalar, the reduction function is applied to the scalar value, and the output is also a scalar. - - +
Constraints for reduction-operations
+ @@ -8070,7 +8075,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for reduction-operations
operand
*output* [=/same type as|same as=] {{input}}0 to {{input}}'s [=MLOperand/rank=], depending on {{MLReduceOptions/axes}} and {{MLReduceOptions/keepDimensions}}[=/any rank|N=]
@@ -8271,8 +8276,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/relu(input, options)/input}}. - - +
Constraints for {{MLGraphBuilder/relu()}}
+ @@ -8304,7 +8309,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-relu)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-relu)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "relu" operation, given |options|. @@ -8421,8 +8426,8 @@ partial dictionary MLOpSupportLimits { The default value is [2, 3]. -
Tensor limits for {{MLGraphBuilder/relu()}}
operand
- +
Constraints for {{MLGraphBuilder/resample2d()}}
+ @@ -8454,7 +8459,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-resample2d)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-resample2d)), then [=exception/throw=] a {{TypeError}}. 1. If |input|'s [=MLOperand/rank=] is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. If |options|.{{MLResample2dOptions/scales}} does not [=map/exist=], then set it to the [=/list=] « 1.0, 1.0 ». 1. Otherwise, if any of its [=list/items=] is less than or equal to 0, or if its [=list/size=] is not 2, then [=exception/throw=] a {{TypeError}}. @@ -8532,8 +8537,8 @@ partial dictionary MLOpSupportLimits { tensor is specified by {{MLGraphBuilder/reshape(input, newShape, options)/newShape}}. -
Tensor limits for {{MLGraphBuilder/resample2d()}}
operand
- +
Constraints for {{MLGraphBuilder/reshape()}}
+ @@ -8549,7 +8554,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/reshape()}}
operand
*output* [=/same type as|same as=] {{input}}{{newShape}}'s [=list/size=][=/any rank|N=]
@@ -8565,6 +8570,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. + 1. If |newShape|'s [=list/size=] is not output tensor's [=/allowed ranks=] (according to [this table](#tensor-limits-reshape)), then [=exception/throw=] a {{TypeError}}. 1. Let |outputShape| be an empty array of {{unsigned long}}. 1. If |newShape|'s [=list/size=] is 0, then set |outputShape| to an empty [=/list=] for a scalar. 1. If any [=list/item=] in |newShape| is not a [=valid dimension=], then [=exception/throw=] a {{TypeError}}. @@ -8614,8 +8620,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/reverse(input, options)/input}}. - - +
Constraints for {{MLGraphBuilder/reverse()}}
+ @@ -8647,7 +8653,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-reverse)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-reverse)), then [=exception/throw=] a {{TypeError}}. 1. Let |inputRank| be |input|'s [=MLOperand/rank=]. 1. If |axes| is not given, then let |axes| be [=the range=] 0 to |inputRank|, exclusive. 1. Otherwise, if |axes| contains duplicate values, or if any of its elements is not in [=the range=] 0 to |inputRank|, exclusive, then return failure. @@ -8679,7 +8685,7 @@ dictionary MLScatterSupportLimits { MLTensorLimits input; MLTensorLimits indices; MLTensorLimits updates; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -8704,8 +8710,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to {{MLGraphBuilder/scatterElements(input, indices, updates, options)/input}}'s [=MLOperand/rank=]. -
Tensor limits for {{MLGraphBuilder/reverse()}}
operand
- +
Constraints for {{MLGraphBuilder/scatterElements()}}
+ @@ -8744,7 +8750,7 @@ partial dictionary MLOpSupportLimits { : updates :: {{MLTensorLimits}} for updates operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following members for {{MLGraphBuilder/scatterElements()}}: @@ -8763,7 +8769,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input| and |indices| and |updates| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |indices|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-scatterelements)), then [=exception/throw=] a {{TypeError}}. + 1. If |indices|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-scatterelements)), then [=exception/throw=] a {{TypeError}}. 1. If |updates|'s [=MLOperand/dataType=] is not equal to |input|'s [=MLOperand/dataType=], then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input|, |indices|, or |updates| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Let |axis| be |options|.{{MLScatterOptions/axis}}. @@ -8914,11 +8920,11 @@ partial dictionary MLOpSupportLimits { - updates: an {{MLOperand}}. New values to replace atop the input. - options: an optional {{MLScatterOptions}}. The optional parameters of the operation. - **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to the [=MLOperand/rank=] of {{MLGraphBuilder/scatterND(input, indices, updates, options)/input}}'s [=MLOperand/rank=] + {{MLGraphBuilder/scatterND(input, indices, updates, options)/indices}}'s [=MLOperand/rank=] - {{MLGraphBuilder/scatterND(input, indices, updates, options)/indices}}'s [=MLOperand/shape=][-1] - 1. + **Returns:** an {{MLOperand}}. The output N-D tensor of [=MLOperand/rank=] equal to {{MLGraphBuilder/scatterND(input, indices, updates, options)/input}}'s [=MLOperand/rank=] + {{MLGraphBuilder/scatterND(input, indices, updates, options)/indices}}'s [=MLOperand/rank=] - {{MLGraphBuilder/scatterND(input, indices, updates, options)/indices}}'s [=MLOperand/shape=][-1] - 1. -
Tensor limits for {{MLGraphBuilder/scatterElements()}}
operand
- +
Constraints for {{MLGraphBuilder/scatterND()}}
+ @@ -8939,7 +8945,7 @@ partial dictionary MLOpSupportLimits { - + @@ -8964,7 +8970,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |input|, |indices|, and |updates| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |indices|'s [=MLOperand/dataType=]'s is not one of the [=/allowed data types=] (according to [this table](#constraints-scatternd)), then [=exception/throw=] a {{TypeError}}. + 1. If |indices|'s [=MLOperand/dataType=]'s is not one of the [=/allowed data types=] (according to [this table](#tensor-limits-scatternd)), then [=exception/throw=] a {{TypeError}}. 1. If |updates|'s [=MLOperand/dataType=] is not equal to |input|'s [=MLOperand/dataType=], then [=exception/throw=] a {{TypeError}}. 1. If the [=MLOperand/rank=] of any of |input|, |indices|, or |updates| is not its [=/allowed rank=], then [=exception/throw=] a {{TypeError}}. 1. Let |inputShape| be |input|'s [=MLOperand/shape=] and |inputRank| be |input|'s [=MLOperand/rank=]. @@ -9122,8 +9128,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/sigmoid(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/scatterND()}}
operand
{{updates}} [=/same type as|same as=] {{input}}{{input}}'s [=MLOperand/rank=] + {{indices}}'s [=MLOperand/rank=] - {{indices}}'s [=MLOperand/shape=][-1] - 1[=/any rank|N=]
*output*
- +
Constraints for {{MLGraphBuilder/sigmoid()}}
+ @@ -9155,7 +9161,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-sigmoid)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-sigmoid)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "sigmoid" operation, given |options|. @@ -9221,8 +9227,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output tensor of the same rank as the input tensor with tensor values stripped to the specified starting and ending indices in each dimension. -
Tensor limits for {{MLGraphBuilder/sigmoid()}}
operand
- +
Constraints for {{MLGraphBuilder/slice()}}
+ @@ -9311,8 +9317,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output N-D tensor that contains the softmax results, of the same shape as {{MLGraphBuilder/softmax(input, axis, options)/input}}. -
Tensor limits for {{MLGraphBuilder/slice()}}
operand
- +
Constraints for {{MLGraphBuilder/softmax()}}
+ @@ -9344,7 +9350,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-softmax)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-softmax)), then [=exception/throw=] a {{TypeError}}. 1. If |axis| is greater than or equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. @@ -9399,8 +9405,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/softplus(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/softmax()}}
operand
- +
Constraints for {{MLGraphBuilder/softplus()}}
+ @@ -9432,7 +9438,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-softplus)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-softplus)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "softplus" operation and |options|. @@ -9492,8 +9498,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/softsign(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/softplus()}}
operand
- +
Constraints for {{MLGraphBuilder/softsign()}}
+ @@ -9525,7 +9531,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-softsign)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-softsign)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "softsign" operation and |options|. @@ -9551,7 +9557,7 @@ partial interface MLGraphBuilder { dictionary MLSplitSupportLimits { MLTensorLimits input; - MLDataTypeLimits outputs; + MLTensorLimits outputs; }; partial dictionary MLOpSupportLimits { @@ -9575,8 +9581,8 @@ partial dictionary MLOpSupportLimits { The dimension along which to split. Its value must be in the range [0, N-1] where N is the [=MLOperand/rank=] of the input tensor. -
Tensor limits for {{MLGraphBuilder/softsign()}}
operand
- +
Constraints for {{MLGraphBuilder/split()}}
+ @@ -9601,7 +9607,7 @@ partial dictionary MLOpSupportLimits { : input :: {{MLTensorLimits}} for input operand. : outputs - :: {{MLDataTypeLimits}} for all the output operands. + :: {{MLTensorLimits}} for all the output operands. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/split()}}: @@ -9691,8 +9697,8 @@ partial dictionary MLOpSupportLimits { - an {{MLOperand}}. The output tensor of the same shape as {{MLGraphBuilder/tanh(input, options)/input}}. -
Tensor limits for {{MLGraphBuilder/split()}}
operand
- +
Constraints for {{MLGraphBuilder/tanh()}}
+ @@ -9724,7 +9730,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#constraints-tanh)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/dataType=] is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-tanh)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "tanh" operation, given |options|. @@ -9777,8 +9783,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The reversed N-D tensor. -
Tensor limits for {{MLGraphBuilder/tanh()}}
operand
- +
Constraints for {{MLGraphBuilder/tile()}}
+ @@ -9862,8 +9868,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The permuted or transposed N-D tensor. -
Tensor limits for {{MLGraphBuilder/tile()}}
operand
- +
Constraints for {{MLGraphBuilder/transpose()}}
+ @@ -9945,8 +9951,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output tensor representing a triangular matrix, or batch of matrices which is the same shape as the input. -
Tensor limits for {{MLGraphBuilder/transpose()}}
operand
- +
Constraints for {{MLGraphBuilder/triangular()}}
+ @@ -9957,7 +9963,7 @@ partial dictionary MLOpSupportLimits { - + @@ -9978,7 +9984,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If |input|'s [=MLOperand/rank=] is not one of its [=/allowed ranks=] (according to [this table](#constraints-triangular)), then [=exception/throw=] a {{TypeError}}. + 1. If |input|'s [=MLOperand/rank=] is not one of its [=/allowed ranks=] (according to [this table](#tensor-limits-triangular)), then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. 1. Let |operator| be an [=operator=] for the "triangular" operation, given |options|. @@ -10067,7 +10073,7 @@ dictionary MLWhereSupportLimits { MLTensorLimits condition; MLTensorLimits trueValue; MLTensorLimits falseValue; - MLDataTypeLimits output; + MLTensorLimits output; }; partial dictionary MLOpSupportLimits { @@ -10085,8 +10091,8 @@ partial dictionary MLOpSupportLimits { **Returns:** an {{MLOperand}}. The output tensor that contains the values selected element-wise from either the {{MLGraphBuilder/where(condition, trueValue, falseValue, options)/trueValue}} or the {{MLGraphBuilder/where(condition, trueValue, falseValue, options)/falseValue}} tensor. -
Tensor limits for {{MLGraphBuilder/triangular()}}
operand
{{input}} [=/any data type|any=]2 or greater2 to [=/any rank|N=]
*output*
- +
Constraints for {{MLGraphBuilder/where()}}
+ @@ -10112,7 +10118,7 @@ partial dictionary MLOpSupportLimits { - +
Tensor limits for {{MLGraphBuilder/where()}}
operand
*output* [=/same type as|same as=] {{trueValue}}maximum of {{condition}}'s [=MLOperand/rank=], {{trueValue}}'s [=MLOperand/rank=] and {{falseValue}}'s [=MLOperand/rank=][=/any rank|N=]
@@ -10125,7 +10131,7 @@ partial dictionary MLOpSupportLimits { : falseValue :: {{MLTensorLimits}} for falseValue operand. : output - :: {{MLDataTypeLimits}} for output operand. + :: {{MLTensorLimits}} for output operand. {{MLOpSupportLimits}} has the following member for {{MLGraphBuilder/where()}}: @@ -10141,7 +10147,7 @@ partial dictionary MLOpSupportLimits { 1. If [=this=] [=MLGraphBuilder/can not build=], then [=exception/throw=] an "{{InvalidStateError}}" {{DOMException}}. 1. If [=MLGraphBuilder/validating operand=] with [=this=] and any of |condition|, |trueValue|, and |falseValue| returns false, then [=exception/throw=] a {{TypeError}}. - 1. If the [=MLOperand/dataType=] of any of |condition|, |trueValue|, or |falseValue| is not one of its [=/allowed data types=] (according to [this table](#constraints-where)), then [=exception/throw=] a {{TypeError}}. + 1. If the [=MLOperand/dataType=] of any of |condition|, |trueValue|, or |falseValue| is not one of its [=/allowed data types=] (according to [this table](#tensor-limits-where)), then [=exception/throw=] a {{TypeError}}. 1. Let |outputShape| be the result of [=bidirectionally broadcasting=] |trueValue|'s [=MLOperand/shape=] and |falseValue|'s [=MLOperand/shape=]. 1. If that returns failure, then [=exception/throw=] a {{TypeError}}. 1. Set |outputShape| to the result of [=bidirectionally broadcasting=] |condition|'s [=MLOperand/shape=] and |outputShape|.