You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Convolution, AveragePool, MaxPool operators, the definition of the 'pads' property is unclear and suggests that padding should be given for all dimensions, not just for spatial dimensions. But all the tools I've used (for instance TF2ONNX and Glow) agree that only the padding for spatial dimensions needs to be given.
I think the ONNX specification would need some clarification.
Convolution 'pads' property:
[...] pads format should be as follow [x1_begin, x2_begin...x1_end, x2_end,...], where xi_begin the number of pixels added at the beginning of axis i and xi_end, the number of pixels added at the end of axis i
For the Pad operator, ONNX tells explicitly that the padding information needs to be provided for all dimensions, so it is clear:
[...] pads rank should be double of the input's rank. pads format should be as follow [x1_begin, x2_begin...x1_end, x2_end,...], where xi_begin the number of pixels added at the beginning of axis i and xi_end, the number of pixels added at the end of axis i.
As an example, in some of the ONNX models I've used, for 4D tensors, I got a 4 element pads array for Convolution&Maxpool and a 8 element pads' array for Pad`
The text was updated successfully, but these errors were encountered:
tlepley-cadence
changed the title
Padding specification unclear for Convolution/AveragePool.MaxPool
Padding specification unclear for Convolution/AveragePool/MaxPool
Nov 27, 2018
For Convolution, AveragePool, MaxPool operators, the definition of the 'pads' property is unclear and suggests that padding should be given for all dimensions, not just for spatial dimensions. But all the tools I've used (for instance TF2ONNX and Glow) agree that only the padding for spatial dimensions needs to be given.
I think the ONNX specification would need some clarification.
Convolution 'pads' property:
For the Pad operator, ONNX tells explicitly that the padding information needs to be provided for all dimensions, so it is clear:
As an example, in some of the ONNX models I've used, for 4D tensors, I got a 4 element
pads
array for Convolution&Maxpool and a 8 elementpads' array for
Pad`The text was updated successfully, but these errors were encountered: