anirudh2290 commented on a change in pull request #10676: fix for asymmetric padding URL: https://github.com/apache/incubator-mxnet/pull/10676#discussion_r183832591
########## File path: python/mxnet/contrib/onnx/_import/op_translations.py ########## @@ -214,10 +214,14 @@ def conv(attrs, inputs, cls): new_attrs = translation_utils._fix_bias('Convolution', new_attrs, len(inputs)) new_attrs = translation_utils._fix_channels('Convolution', new_attrs, inputs, cls) - + if 'pad' in new_attrs: + pad_attr = new_attrs['pad'] + if pad_attr[:len(pad_attr)/2] != pad_attr[len(pad_attr)/2:]: + raise NotImplementedError("Asymmetric padding is not supported for " + + "convolution operator.") + new_attrs['pad'] = pad_attr[:len(pad_attr)/2] return 'Convolution', new_attrs, inputs - def deconv(attrs, inputs, cls): """Compute N-D convolution on (N+2)-D input.""" new_attrs = translation_utils._fix_attribute_names(attrs, {'kernel_shape' : 'kernel', Review comment: Don't we need to do this for deconv too ? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services