@@ -3533,12 +3513,10 @@ partial interface MLGraphBuilder {
: alpha
::
- A {{float}} scalar multiplier.
- The default value is 0.2.
+ A scalar multiplier.
: beta
::
- A {{float}} scalar addition.
- The default value is 0.5.
+ A scalar addition.
#### {{MLGraphBuilder/hardSigmoid(input, options)}} #### {#api-mlgraphbuilder-hardsigmoid-input-options}
@@ -3723,23 +3701,23 @@ partial interface MLGraphBuilder {
};
-The {{MLInstanceNormalizationOptions}} members are:
+{{MLInstanceNormalizationOptions}} has the following members:
: scale
::
- An {{MLOperand}}. Specifies the 1-D tensor of the scaling values whose [=list/size=] is equal to the number of channels, i.e. the size of the feature dimension of the input. For example, for an |input| tensor with `nchw` layout, the [=list/size=] is equal to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[1].
+ The 1-D tensor of the scaling values whose [=list/size=] is equal to the number of channels, i.e. the size of the feature dimension of the input. For example, for an |input| tensor with `nchw` layout, the [=list/size=] is equal to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[1].
: bias
::
- An {{MLOperand}}. Specifies the 1-D tensor of the bias values whose [=list/size=] is equal to the size of the feature dimension of the input. For example, for an |input| tensor with `nchw` layout, the [=list/size=] is equal to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[1].
+ The 1-D tensor of the bias values whose [=list/size=] is equal to the size of the feature dimension of the input. For example, for an |input| tensor with `nchw` layout, the [=list/size=] is equal to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[1].
: epsilon
::
- A {{float}} scalar. Specifies a small value to prevent computational error due to divide-by-zero.
+ A small value to prevent computational error due to divide-by-zero.
: layout
::
- An {{MLInputOperandLayout}}. Specifies the layout format of the input.
+ The layout format of the input.
@@ -3827,23 +3805,23 @@ partial interface MLGraphBuilder {
};
-The {{MLLayerNormalizationOptions}} members are:
+{{MLLayerNormalizationOptions}} has the following members:
: scale
::
- An {{MLOperand}}. Specifies the N-D tensor of the scaling values whose shape is determined by the |axes| member in that each value in |axes| indicates the dimension of the input tensor with scaling values. For example, for an |axes| values of [1,2,3], the shape of this tensor is the list of the corresponding sizes of the input dimension 1, 2 and 3. When this member is not present, the scaling value is assumed to be 1.
+ The N-D tensor of the scaling values whose shape is determined by the |axes| member in that each value in |axes| indicates the dimension of the input tensor with scaling values. For example, for an |axes| values of [1,2,3], the shape of this tensor is the list of the corresponding sizes of the input dimension 1, 2 and 3. When this member is not present, the scaling value is assumed to be 1.
: bias
::
- An {{MLOperand}}. Specifies the N-D tensor of the bias values whose shape is determined by the |axes| member in that each value in |axes| indicates the dimension of the input tensor with bias values. For example, for an |axes| values of [1,2,3], the shape of this tensor is the list of the corresponding sizes of the input dimension 1, 2 and 3. When this member is not present, the bias value is assumed to be 0.
+ The N-D tensor of the bias values whose shape is determined by the |axes| member in that each value in |axes| indicates the dimension of the input tensor with bias values. For example, for an |axes| values of [1,2,3], the shape of this tensor is the list of the corresponding sizes of the input dimension 1, 2 and 3. When this member is not present, the bias value is assumed to be 0.
: axes
::
- A sequence of {{unsigned long}}. The indices to the input dimensions to reduce. When this member is not present, it is assumed to be [1,2,3] that is, the reduction for the mean and variance values are calculated across all the input features for each individual sample in the batch.
+ The indices to the input dimensions to reduce. When this member is not present, it is assumed to be [1,2,3] that is, the reduction for the mean and variance values are calculated across all the input features for each individual sample in the batch.
: epsilon
::
- A {{float}} scalar. Specifies a small value to prevent computational error due to divide-by-zero.
+ A small value to prevent computational error due to divide-by-zero.
@@ -3951,8 +3929,7 @@ partial interface MLGraphBuilder {
: alpha
::
- A {{float}} scalar multiplier.
- The default value is 0.01.
+ A scalar multiplier.
#### {{MLGraphBuilder/leakyRelu(input, options)}} #### {#api-mlgraphbuilder-leaky-relu-input-options}
@@ -4040,12 +4017,10 @@ partial interface MLGraphBuilder {
: alpha
::
- A {{float}} scalar multiplier.
- The default value is 1.
+ A scalar multiplier.
: beta
::
- A {{float}} scalar addition.
- The default value is 0.
+ A scalar addition.
#### {{MLGraphBuilder/linear(input, options)}} #### {#api-mlgraphbuilder-linear-input-options}
@@ -4129,39 +4104,39 @@ partial interface MLGraphBuilder {
: bias
::
- An {{MLOperand}}. Specifies the 2-D input bias tensor of shape [numDirections, 4 * hiddenSize]. The ordering of the bias vectors in the second dimension of the tensor shape is specified according to {{MLLstmOptions/layout}}.
+ The 2-D input bias tensor of shape [numDirections, 4 * hiddenSize]. The ordering of the bias vectors in the second dimension of the tensor shape is specified according to {{MLLstmOptions/layout}}.
: recurrentBias
::
- An {{MLOperand}}. Specifies the 2-D recurrent bias tensor of shape [numDirections, 4 * hiddenSize]. The ordering of the bias vectors in the first dimension of the tensor shape is specified according to {{MLLstmOptions/layout}}.
+ The 2-D recurrent bias tensor of shape [numDirections, 4 * hiddenSize]. The ordering of the bias vectors in the first dimension of the tensor shape is specified according to {{MLLstmOptions/layout}}.
: peepholeWeight
::
- An {{MLOperand}}. Specifies the 2-D weight tensor for peepholes of shape [numDirections, 3 * hiddenSize]. The pack ordering of the weight vectors is for the `input (i)`, `output (o)`, and `forget (f)` gate, respectively.
+ The 2-D weight tensor for peepholes of shape [numDirections, 3 * hiddenSize]. The pack ordering of the weight vectors is for the `input (i)`, `output (o)`, and `forget (f)` gate, respectively.
: initialHiddenState
::
- An {{MLOperand}}. Specifies the 3-D initial hidden state tensor of shape [numDirections, batchSize, hiddenSize]. When not specified, implementations SHOULD use a tensor filled with zero.
+ The 3-D initial hidden state tensor of shape [numDirections, batchSize, hiddenSize]. When not specified, implementations SHOULD use a tensor filled with zero.
: initialCellState
::
- An {{MLOperand}}. Specifies the 3-D initial hidden state tensor of shape [numDirections, batchSize, hiddenSize]. When not specified, implementations SHOULD use a tensor filled with zero.
+ The 3-D initial hidden state tensor of shape [numDirections, batchSize, hiddenSize]. When not specified, implementations SHOULD use a tensor filled with zero.
: returnSequence
::
- A {{boolean}} indicating whether to also return the entire sequence with every output from each time step in it in addition to the output of the last time step.
+ Indicates whether to also return the entire sequence with every output from each time step in it in addition to the output of the last time step.
: direction
::
- An {{MLRecurrentNetworkDirection}}. Specifies the processing direction of the input sequence. When set to {{MLRecurrentNetworkDirection/"both"}}, the size of the first dimension of the weight and the bias tensor shapes must be 2, and the input is processed in both directions.
+ The processing direction of the input sequence. When set to {{MLRecurrentNetworkDirection/"both"}}, the size of the first dimension of the weight and the bias tensor shapes must be 2, and the input is processed in both directions.
: layout
::
- An {{MLLstmWeightLayout}}. The ordering of the weight and bias vectors for the internal gates of LSTM, specifically the `input (i)`, `output (o)`, `forget (f)`, and `cell (g)` gate, as indicated in the first dimension of the weight and bias tensor shapes. When not specified, the default layout is {{MLLstmWeightLayout/"iofg"}}.
+ The ordering of the weight and bias vectors for the internal gates of LSTM, specifically the `input (i)`, `output (o)`, `forget (f)`, and `cell (g)` gate, as indicated in the first dimension of the weight and bias tensor shapes.
: activations
::
- A sequence of {{MLActivation}}. A sequence of three activation functions, the first one is used for the `input (i)`, `forget (f)`, and `output (o)` gate, the second one is used for the `cell (g)` gate, and the last used for filtering the output cell state before combining it with the result of the output gate to form the output hidden state. When not specified, implementations SHOULD use the sequence of the sigmoid function ("sigmoid") followed by two hyperbolic tangent functions ("tanh") respectively.
+ A list of three activation functions, the first one is used for the `input (i)`, `forget (f)`, and `output (o)` gate, the second one is used for the `cell (g)` gate, and the last used for filtering the output cell state before combining it with the result of the output gate to form the output hidden state. When not specified, implementations SHOULD use the sequence of the sigmoid function ("sigmoid") followed by two hyperbolic tangent functions ("tanh") respectively.
@@ -4349,23 +4324,23 @@ partial interface MLGraphBuilder {
: bias
::
- An {{MLOperand}}. The 1-D input bias tensor of shape [4 * hiddenSize]. The ordering of the bias vectors in the first dimension of the tensor shape is specified according to the {{MLLstmCellOptions/layout}} argument.
+ The 1-D input bias tensor of shape [4 * hiddenSize]. The ordering of the bias vectors in the first dimension of the tensor shape is specified according to the {{MLLstmCellOptions/layout}} argument.
: recurrentBias
::
- An {{MLOperand}}. The 1-D recurrent bias tensor of shape [4 * hiddenSize]. The ordering of the bias vectors in the first dimension of the tensor shape is specified according to the {{MLLstmCellOptions/layout}} argument.
+ The 1-D recurrent bias tensor of shape [4 * hiddenSize]. The ordering of the bias vectors in the first dimension of the tensor shape is specified according to the {{MLLstmCellOptions/layout}} argument.
: peepholeWeight
::
- An {{MLOperand}}. The 1-D weight tensor for peepholes of shape [3 * hiddenSize]. The pack ordering of the weight vectors is for the `input (i)`, `output (o)`, and `forget (f)` gate, respectively.
+ The 1-D weight tensor for peepholes of shape [3 * hiddenSize]. The pack ordering of the weight vectors is for the `input (i)`, `output (o)`, and `forget (f)` gate, respectively.
: layout
::
- An {{MLLstmWeightLayout}}. The ordering of the weight and bias vectors for the internal gates of LSTM, specifically the `input (i)`, `output (o)`, `forget (f)`, and `cell (g)` gate, as indicated in the first dimension of the weight and bias tensor shapes. When not specified, the default layout is {{MLLstmWeightLayout/"iofg"}}.
+ The ordering of the weight and bias vectors for the internal gates of LSTM, specifically the `input (i)`, `output (o)`, `forget (f)`, and `cell (g)` gate, as indicated in the first dimension of the weight and bias tensor shapes.
: activations
::
- A sequence of {{MLActivation}}. A sequence of three activation functions, the first one is used for the `input (i)`, `forget (f)`, and `output (o)` gate, the second one is used for the `cell (g)` gate, and the last used for filtering the output cell state before combining it with the result of the output gate to form the output hidden state. When not specified, they are assumed to be of the sigmoid function ("sigmoid") followed by two hyperbolic tangent functions ("tanh") respectively.
+ A list of three activation functions, the first one is used for the `input (i)`, `forget (f)`, and `output (o)` gate, the second one is used for the `cell (g)` gate, and the last used for filtering the output cell state before combining it with the result of the output gate to form the output hidden state. When not specified, they are assumed to be of the sigmoid function ("sigmoid") followed by two hyperbolic tangent functions ("tanh") respectively.
@@ -4636,15 +4611,11 @@ partial interface MLGraphBuilder {
: mode
::
- An {{MLPaddingMode}} [=string=].
- Specifies the different ways to pad the tensor.
- The default value is {{MLPaddingMode/"constant"}}.
+ The different ways to pad the tensor.
: value
::
- A {{float}}.
- Specifies the padding value when {{MLPadOptions/mode}} is set to {{MLPaddingMode/"constant"}}.
- The default value is 0.
+ The padding value when {{MLPadOptions/mode}} is set to {{MLPaddingMode/"constant"}}.
@@ -4769,33 +4740,32 @@ partial interface MLGraphBuilder {
: windowDimensions
::
- A sequence of {{unsigned long}} of length 2: [windowHeight, windowWidth].
+ A list of length 2: *[windowHeight, windowWidth]*.
Specifies the dimensions of the sliding window.
The default value for the window dimensions are the height and width dimensions of the input shape.
: padding
::
- A sequence of {{unsigned long}} of length 4: [beginningHeight, endingHeight, beginningWidth, endingWidth].
+ A list of length 4: *[beginningHeight, endingHeight, beginningWidth, endingWidth]*.
Specifies the additional rows and columns added to the beginning and ending of each spatial dimension of the convolution input.
The default value is [0,0,0,0].
: strides
::
- A sequence of {{unsigned long}} of length 2: [strideHeight, strideWidth].
+ A list of length 2: *[strideHeight, strideWidth]*.
Specifies the stride of the sliding window for each spatial dimension of the convolution input.
The default value is [1,1].
: dilations
::
- A sequence of {{unsigned long}} of length 2: [dilationHeight, dilationWidth]. Specifies the dilation factor for each spatial dimension applied on the convolution filter (kernel).
+ A list of length 2: *[dilationHeight, dilationWidth]*. Specifies the dilation factor for each spatial dimension applied on the convolution filter (kernel).
The default value is [1,1].
: autoPad
::
- An {{MLAutoPad}} [=string=].
- Specifies the automatic input padding options.
- The default value is {{MLAutoPad/"explicit"}}, which means that the values in the {{MLPool2dOptions/padding}} array should be used for input padding.
- When the option is set other than {{MLAutoPad/"explicit"}}, the values in the {{MLPool2dOptions/padding}} array are ignored.
+ The automatic input padding options.
+ The default value is {{MLAutoPad/"explicit"}}, which means that the values in {{MLPool2dOptions/padding}} should be used for input padding.
+ When the option is set other than {{MLAutoPad/"explicit"}}, the values in {{MLPool2dOptions/padding}} are ignored.
With the {{MLAutoPad/"same-upper"}} option, the padding values are automatically computed such that the additional ending padding of the spatial input dimensions would allow all of the input values in the corresponding dimension to be filtered.
@@ -4803,7 +4773,6 @@ partial interface MLGraphBuilder {
: layout
::
- An {{MLInputOperandLayout}} [=string=].
Specifies the layout format of the input and output tensor as follows:
- {{MLInputOperandLayout/"nchw"}}
- input tensor: *[batches, inputChannels, height, width]*
@@ -4811,16 +4780,14 @@ partial interface MLGraphBuilder {
- {{MLInputOperandLayout/"nhwc"}}:
- input tensor: *[batches, height, width, inputChannels]*
- output tensor: *[batches, height, width, outputChannels]*
- The default value is {{MLInputOperandLayout/"nchw"}}.
: roundingType
::
- An {{MLRoundingType}} [=string=].
- Specifies the rounding function used to compute the output shape.
+ The rounding function used to compute the output shape.
: outputSizes
::
- A sequence of {{unsigned long}} of length 2.
+ A list of length 2.
Specifies the sizes of the two spacial dimensions of the output tensor. When the output sizes are explicitly specified, the {{MLPool2dOptions/roundingType}} is ignored.
If not specified, the output sizes are automatically computed.
@@ -5005,11 +4972,11 @@ partial interface MLGraphBuilder {
: axes
::
- A sequence of {{unsigned long}}. The dimensions to reduce. The values in the sequence must be in the range [0, N-1] where N is the [=rank=] of the input tensor. If not present, all dimensions are reduced.
+ The dimensions to reduce. The values in the list must be in the range [0, N-1] where N is the [=rank=] of the input tensor. If not present, all dimensions are reduced.
: keepDimensions
::
- A {{boolean}}. If true, retains reduced dimensions with [=list/size=] 1. The default value is false.
+ If true, retains reduced dimensions with [=list/size=] 1.
@@ -5238,24 +5205,22 @@ partial interface MLGraphBuilder {
: mode
::
- An {{MLInterpolationMode}} [=string=].
- Specifies the interpolation algorithm used to fill the output tensor values.
- The default value is {{MLInterpolationMode/"nearest-neighbor"}}, standing for *Nearest Neighbor* interpolation.
+ The interpolation algorithm used to fill the output tensor values.
: scales
::
- A sequence of {{float}} of length 2.
- Specifies the scaling factor in each spatial dimensions of the input: [scaleHeight, scaleWidth].
+ A list of length 2.
+ Specifies the scaling factor in each spatial dimensions of the input: *[scaleHeight, scaleWidth]*.
The default value is [1.0, 1.0].
: sizes
::
- A sequence of {{unsigned long}} of length 2.
- Specifies the target sizes for each spatial dimensions of the input: [sizeHeight, sizeWidth]. When the target sizes are specified, the {{MLResample2dOptions/scales}} argument is ignored, since the scaling factor values are derived from the target sizes of each spatial dimension of the input.
+ A list of length 2.
+ Specifies the target sizes for each spatial dimensions of the input: *[sizeHeight, sizeWidth]*. When the target sizes are specified, the {{MLResample2dOptions/scales}} argument is ignored, since the scaling factor values are derived from the target sizes of each spatial dimension of the input.
: axes
::
- A sequence of {{unsigned long}} of length 2.
+ A list of length 2.
Specifies the two consecutive dimensions of the input tensor to which the interpolation algorithm applies. The valid values in the sequence are [0, 1], [1, 2] or [2, 3].
The default value is [2, 3].
@@ -5626,8 +5591,7 @@ partial interface MLGraphBuilder {
: steepness
::
- A {{float}} scalar parameter.
- The default value is 1.
+ A scalar parameter.
#### {{MLGraphBuilder/softplus(input, options)}} #### {#api-mlgraphbuilder-softplus-input-options}
@@ -5779,8 +5743,7 @@ partial interface MLGraphBuilder {
: axis
::
- An {{unsigned long}} scalar. The dimension along which to split. Its value must be in the range [0, N-1] where N is the [=rank=] of the input tensor.
- The default value is 0.
+ The dimension along which to split. Its value must be in the range [0, N-1] where N is the [=rank=] of the input tensor.
@@ -5919,8 +5882,7 @@ partial interface MLGraphBuilder {
: permutation
::
- A sequence of {{unsigned long}} values.
- Specifies the values used to permute the output shape.
+ The values used to permute the output shape.
The default value is [N-1, ..., 0], where N is the [=rank=] of the input tensor, e.g. [2,1,0] for a 3-D tensor.
These default values cause the output to become a transposed tensor of the input. When specified, the number of values in the sequence must be the same as the [=rank=] of the input tensor, and the values in the sequence must be within the range from 0 to N-1 with no two or more same values found in the sequence.
@@ -5975,10 +5937,10 @@ partial interface MLGraphBuilder {
: upper
::
- A {{boolean}} value. Indicate whether the output the upper or the lower part of the input matrix is retained. If not set, it is assumed to be true, indicating that the upper part is retained.
+ Indicates whether the output the upper or the lower part of the input matrix is retained. True indicates that the upper part is retained.
: diagonal
::
- A {{long}} value. Specify how many diagonals above or below the main diagonals of the input matrix are retained or excluded. If not set, this value is assumed to be 0, which means no diagonals other than the main diagonals are affected.
+ How many diagonals above or below the main diagonals of the input matrix are retained or excluded. A value of 0 means no diagonals other than the main diagonals are affected.