We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to convert a model from onnx to pytorch, however I'm get the following error:
43 padding, padding_module = onnx_auto_pad_to_torch_padding( 44 onnx_padding=node_attributes.get('pads', [0] * spatial_rank * 2), 45 auto_pad=node_attributes.get('auto_pad', 'NOTSET'), 46 ) 47 if padding_module is not None: ---> 48 raise NotImplementedError('AvgPool with non symmetrical padding is not implemented.') 50 torch_module = avgpool_class( 51 kernel_size=kernel_shape, 52 stride=strides, (...) 55 ceil_mode=ceil_mode == 1, 56 ) 58 return OperationConverterResult( 59 torch_module=torch_module, 60 onnx_mapping=onnx_mapping_from_node(node=node), 61 ) NotImplementedError: AvgPool with non symmetrical padding is not implemented.
The text was updated successfully, but these errors were encountered:
I’m not sure whether this change is correct but it appears to work:
padding, padding_module = onnx_auto_pad_to_torch_padding( onnx_padding=node_attributes.get('pads', [0] * spatial_rank * 2), auto_pad=node_attributes.get('auto_pad', 'NOTSET'), ) - if padding_module is not None: - raise NotImplementedError('AvgPool with non symmetrical padding is not implemented.') torch_module = avgpool_class( kernel_size=kernel_shape, stride=strides, padding=padding, count_include_pad=count_include_pad == 1, ceil_mode=ceil_mode == 1, ) + + if padding_module is not None: + torch_module = nn.Sequential(padding_module, torch_module) return OperationConverterResult( torch_module=torch_module, onnx_mapping=onnx_mapping_from_node(node=node), )
Sorry, something went wrong.
No branches or pull requests
I'm trying to convert a model from onnx to pytorch, however I'm get the following error:
The text was updated successfully, but these errors were encountered: