From f269174638b8872b0611e16433ca38372caac0a7 Mon Sep 17 00:00:00 2001 From: Ningxin Hu Date: Wed, 28 Feb 2024 04:58:13 +0800 Subject: [PATCH] Remove MLAutoPad (#587) Fix #326 --- index.bs | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/index.bs b/index.bs index 4b12a3ec..b9c65936 100644 --- a/index.bs +++ b/index.bs @@ -1709,17 +1709,10 @@ enum MLConv2dFilterOperandLayout { "ihwo" }; -enum MLAutoPad { - "explicit", - "same-upper", - "same-lower" -}; - dictionary MLConv2dOptions { sequence padding; sequence strides; sequence dilations; - MLAutoPad autoPad = "explicit"; unsigned long groups = 1; MLInputOperandLayout inputLayout = "nchw"; MLConv2dFilterOperandLayout filterLayout = "oihw"; @@ -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]. - : autoPad - :: - 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. - : groups :: The number of groups that input channels and output channels are divided into. @@ -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}}. @@ -1870,7 +1852,6 @@ dictionary MLConvTranspose2dOptions { sequence dilations; sequence outputPadding; sequence outputSizes; - MLAutoPad autoPad = "explicit"; unsigned long groups = 1; MLInputOperandLayout inputLayout = "nchw"; MLConvTranspose2dFilterOperandLayout filterLayout = "iohw"; @@ -1919,16 +1900,6 @@ partial interface MLGraphBuilder { If not specified, the output sizes are automatically computed. - : autoPad - :: - 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. - : groups :: The number of groups that input channels and output channels are divided into. @@ -4352,7 +4323,6 @@ dictionary MLPool2dOptions { sequence padding; sequence strides; sequence dilations; - MLAutoPad autoPad = "explicit"; MLInputOperandLayout layout = "nchw"; MLRoundingType roundingType = "floor"; sequence outputSizes; @@ -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]. - : autoPad - :: - 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. - : layout :: Specifies the layout format of the input and output tensor as follows: @@ -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: