Skip to content
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

Gradient check fails?? #5

Open
Miracle2333 opened this issue Nov 16, 2018 · 2 comments
Open

Gradient check fails?? #5

Miracle2333 opened this issue Nov 16, 2018 · 2 comments

Comments

@Miracle2333
Copy link

I am able to build setup.py and run test_GPUpool without errors. But gradient check results are always wrong. And I got the following warnings:
UserWarning: At least one of the inputs that requires gradient is not of double precision floating point. This check will likely fail if all the inputs are not of double precision floating point. 'At least one of the inputs that requires gradient '
I check that the data type of X is float while that of spx is int.
Should spx be converted to float to pass the gradient check?

@bermanmaxim
Copy link
Owner

I think you should use the "double" type instead of float for your inputs and network. @Mathijssch do you confirm?

@Mathijssch
Copy link
Collaborator

If I recall correctly, the kernel is templated and should be able to handle both floats and doubles as X. spx should certainly contain ints, although it get converted automatically to ints if you would supply it as floats. The current test_GPUpool (which indeed uses floats for the test image) did use to pass previously, so I suspect it might have to do with the newer pytorch version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants