-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Allow onnx export for maxpool with dilations #18721
New issue
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
Conversation
|
@karljang - Could you add a test for this as well. |
houseroad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@houseroad I've added dilation test cases to the file, but they are failing because the ONNX export is using the 'opset' version 9, in which the dilation attribute is not supported. I don't know how to solve it. Thank you, |
|
Yes, you can specify the opset version when you export model from pytorch, here is an example: https://github.com/pytorch/pytorch/blob/master/test/onnx/test_operators.py#L552 |
|
Thank you~, I'll take a look this week. |
|
The failed test is due to a long line in a recent commit in test/test_jit.py, not mine :) @houseroad Actually, the Caffe2 seems not supporting the dilated pooling operations.
But, still, I believe it makes sense to enable this feature because PyTorch supports it and dilated pooling has some application, just like the dilated convolutions. |
|
@houseroad @spandantiwari |
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@houseroad merged this pull request in 6f7a315. |
Now, MaxPool operator supports the 'dilations' attribute with this commit:
onnx/onnx@b22041c