Skip to content

Conversation

@lara-hdr
Copy link
Contributor

@lara-hdr lara-hdr commented Feb 5, 2019

No description provided.

Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we're moving away from expect files for the JIT I would love to see the same happen for ONNX tests 😕 To be honest 1k added of expect files is quite a lot.

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to introduce too many expect files, since it has obvious drawbacks. So one expect test for one op sounds reasonable. MaxPool should be already covered. AveragePool we can add a simple one which should be around 20 lines. To test the operators thoroughly, usually we do end to end test to make sure that the exported models are interpreted correctly in Caffe2. So in this case, I would suggest you to add tests in https://github.com/pytorch/pytorch/blob/master/test/onnx/test_pytorch_onnx_caffe2.py to cover different conditions.

@lara-hdr
Copy link
Contributor Author

@houseroad, does this PR look better now that the tests are changed for tests in test_pytorch_onnx_caffe2.py ?

@houseroad
Copy link
Member

No, the CI still fail, especially, the onnx one. I will take a look when I get time. Also feel free to check what cause the problem in the CI as well.

@dashesy
Copy link
Contributor

dashesy commented Mar 4, 2019

Some related issues: (onnx/onnx#549) and (onnx/tutorials#39) and (#2898) and (#16336)

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is caused by the division on the integer type.

Please explicitly set the type, otherwise, we will have such problems.
If you use the python 2 environment, you should be able to reproduce it.

@lara-hdr
Copy link
Contributor Author

lara-hdr commented Mar 5, 2019

Thank you @houseroad for your help debugging the issue :)

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

return g.op('Softplus', self)


def get_pool_ceil_padding(input, kernel_size, stride, padding):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: add some comments about the purpose of this function.

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants