Skip to content

Commit

Permalink
Remove MLAutoPad (#587)
Browse files Browse the repository at this point in the history
Fix #326
  • Loading branch information
huningxin authored Feb 27, 2024
1 parent a904425 commit f269174
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1709,17 +1709,10 @@ enum MLConv2dFilterOperandLayout {
"ihwo"
};

enum MLAutoPad {
"explicit",
"same-upper",
"same-lower"
};

dictionary MLConv2dOptions {
sequence<unsigned long> padding;
sequence<unsigned long> strides;
sequence<unsigned long> dilations;
MLAutoPad autoPad = "explicit";
unsigned long groups = 1;
MLInputOperandLayout inputLayout = "nchw";
MLConv2dFilterOperandLayout filterLayout = "oihw";
Expand Down Expand Up @@ -1751,16 +1744,6 @@ partial interface MLGraphBuilder {
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].

: <dfn>autoPad</dfn>
::
The automatic input padding options.
The default value is {{MLAutoPad/"explicit"}}, which means that the values in {{MLConv2dOptions/padding}} should be used for input padding.
When the option is set other than {{MLAutoPad/"explicit"}}, the values in {{MLConv2dOptions/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.

The {{MLAutoPad/"same-lower"}} option is similar but padding is applied to the beginning padding of the spatial input dimensions instead of the ending one.

: <dfn>groups</dfn>
::
The number of groups that input channels and output channels are divided into.
Expand Down Expand Up @@ -1828,7 +1811,6 @@ partial interface MLGraphBuilder {
1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then [=exception/throw=] a {{TypeError}}.
1. If |options|.{{MLConv2dOptions/dilations}} does not [=map/exist=], set it to the [=/list=] « 1, 1 ».
1. Else if |options|.{{MLConv2dOptions/dilations}}'s [=list/size=] is not 2, then [=exception/throw=] a {{TypeError}}.
1. If |options|.{{MLConv2dOptions/autoPad}} does not [=map/exist=], set it to {{MLAutoPad/"explicit"}}.
1. If |options|.{{MLConv2dOptions/groups}} is 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. If |inputSize| / |options|.{{MLConv2dOptions/groups}} is not equal to |filterSize|, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. Else if |inputSize| % |options|.{{MLConv2dOptions/groups}} is not 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
Expand Down Expand Up @@ -1870,7 +1852,6 @@ dictionary MLConvTranspose2dOptions {
sequence<unsigned long> dilations;
sequence<unsigned long> outputPadding;
sequence<unsigned long> outputSizes;
MLAutoPad autoPad = "explicit";
unsigned long groups = 1;
MLInputOperandLayout inputLayout = "nchw";
MLConvTranspose2dFilterOperandLayout filterLayout = "iohw";
Expand Down Expand Up @@ -1919,16 +1900,6 @@ partial interface MLGraphBuilder {

If not specified, the output sizes are automatically computed.

: <dfn>autoPad</dfn>
::
The automatic input padding options.
The default value is {{MLAutoPad/"explicit"}}, which means that the values in {{MLConvTranspose2dOptions/padding}} should be used for input padding.
When the option is set other than {{MLAutoPad/"explicit"}}, the values in {{MLConvTranspose2dOptions/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.

The {{MLAutoPad/"same-lower"}} option is similar but padding is applied to the beginning padding of the spatial input dimensions instead of the ending one.

: <dfn>groups</dfn>
::
The number of groups that input channels and output channels are divided into.
Expand Down Expand Up @@ -4352,7 +4323,6 @@ dictionary MLPool2dOptions {
sequence<unsigned long> padding;
sequence<unsigned long> strides;
sequence<unsigned long> dilations;
MLAutoPad autoPad = "explicit";
MLInputOperandLayout layout = "nchw";
MLRoundingType roundingType = "floor";
sequence<unsigned long> outputSizes;
Expand Down Expand Up @@ -4390,16 +4360,6 @@ partial interface MLGraphBuilder {
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].

: <dfn>autoPad</dfn>
::
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.

The {{MLAutoPad/"same-lower"}} option is similar but padding is applied to the beginning padding of the spatial input dimensions instead of the ending one.

: <dfn>layout</dfn>
::
Specifies the layout format of the input and output tensor as follows:
Expand Down Expand Up @@ -4467,7 +4427,6 @@ partial interface MLGraphBuilder {
1. If |options|.{{MLPool2dOptions/dilations}} does not [=map/exist=], set |options|.{{MLPool2dOptions/dilations}} to the [=/list=] « 1, 1 ».
1. If |options|.{{MLPool2dOptions/dilations}}'s [=list/size=] is not 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. If any value in |options|.{{MLPool2dOptions/dilations}} is not greater than 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1. If |options|.{{MLPool2dOptions/autoPad}} is not {{MLAutoPad/"explicit"}}, set |options|.{{MLPool2dOptions/padding}} to the [=/list=] « 0, 0, 0, 0 ».
1. Let |desc| be a copy of |input|.{{MLOperand/[[descriptor]]}}.
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
1. Make a request to the underlying platform to:
Expand Down

0 comments on commit f269174

Please sign in to comment.