Skip to content

Commit

Permalink
Use unsigned long type for sizes option of resample2d
Browse files Browse the repository at this point in the history
The sizes option of resample2d specifies the target sizes for each
spatial dimensions of input operand. Its type should be consistent with
the type of operand dimensions which is unsigned long.

fix #300
  • Loading branch information
huningxin committed Dec 5, 2022
1 parent 64e2648 commit a91d79b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ enum MLInterpolationMode {
dictionary MLResample2dOptions {
MLInterpolationMode mode = "nearest-neighbor";
sequence<float> scales;
sequence<long> sizes;
sequence<unsigned long> sizes;
sequence<long> axes;
};

Expand All @@ -2088,7 +2088,7 @@ partial interface MLGraphBuilder {
- *mode*: an {{MLInterpolationMode}}. The interpolation algorithm used to fill the output tensor values.
If not set, it is assumed to be the *Nearest Neighbor* interpolation.
- *scales*: a sequence of {{float}} of length 2. Each value represents the scaling factor used to scale in each spatial dimensions of input, [scale_height, scale_width]. If not set, the values are assumed to be [1.0, 1.0].
- *sizes*: a sequence of {{long}} of length 2. The target sizes for each spatial dimensions of input, [size_height, size_width]. When the target sizes are specified, the *options.scales* argument is ignored as the scaling factor values are derived from the target sizes of each spatial dimension of input.
- *sizes*: a sequence of {{unsigned long}} of length 2. The target sizes for each spatial dimensions of input, [size_height, size_width]. When the target sizes are specified, the *options.scales* argument is ignored as the scaling factor values are derived from the target sizes of each spatial dimension of input.
- *axes*: a sequence of {{long}} of length 2. 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]. When not specified, the sequence is assumed to be [2, 3].

**Returns:** an {{MLOperand}}. The output 4-D tensor.
Expand Down

0 comments on commit a91d79b

Please sign in to comment.