Comments (11)
Hi,
you might need to look at #known-issues.
If you want to do gradcheck, better do it with double type. I have done it before (check out previous commits).
from dcnv2.
some times I got this error message:
xxxxx@DeskPC:~/Desktop/DCNv2$ sudo python3 test.py
torch.Size([2, 64, 128, 128])
torch.Size([20, 32, 7, 7])
torch.Size([20, 32, 7, 7])
torch.Size([20, 32, 7, 7])
0.971507, 1.943014
0.971507, 1.943014
Zero offset passed
/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py:170: 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 '
check_gradient_dpooling: True
Traceback (most recent call last):
File "test.py", line 265, in <module>
check_gradient_dconv()
File "test.py", line 97, in check_gradient_dconv
eps=1e-3, atol=1e-4, rtol=1e-2))
File "/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py", line 205, in gradcheck
'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
File "/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py", line 185, in fail_test
raise RuntimeError(msg)
RuntimeError: Jacobian mismatch for output 0 with respect to input 1,
numerical:tensor([[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, -0.0011, ..., 0.0000, 0.0000, 0.0000],
...,
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000]])
analytical:tensor([[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, -0.0011, ..., 0.0000, 0.0000, 0.0000],
...,
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000],
[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000]])
from dcnv2.
Same issue here. It seems like it did not pass through its own test?
Is it because of this?
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.
from dcnv2.
Did any one find the reason? I am getting exactly the same error.
from dcnv2.
me too,How to deal with this error
from dcnv2.
the same error occured
from dcnv2.
the same error occured
from dcnv2.
some times I got this error message:
xxxxx@DeskPC:~/Desktop/DCNv2$ sudo python3 test.py torch.Size([2, 64, 128, 128]) torch.Size([20, 32, 7, 7]) torch.Size([20, 32, 7, 7]) torch.Size([20, 32, 7, 7]) 0.971507, 1.943014 0.971507, 1.943014 Zero offset passed /usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py:170: 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 ' check_gradient_dpooling: True Traceback (most recent call last): File "test.py", line 265, in <module> check_gradient_dconv() File "test.py", line 97, in check_gradient_dconv eps=1e-3, atol=1e-4, rtol=1e-2)) File "/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py", line 205, in gradcheck 'numerical:%s\nanalytical:%s\n' % (i, j, n, a)) File "/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py", line 185, in fail_test raise RuntimeError(msg) RuntimeError: Jacobian mismatch for output 0 with respect to input 1, numerical:tensor([[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, -0.0011, ..., 0.0000, 0.0000, 0.0000], ..., [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000]]) analytical:tensor([[ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, -0.0011, ..., 0.0000, 0.0000, 0.0000], ..., [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000], [ 0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0000]])
the same error occured
from dcnv2.
Got the same error
from dcnv2.
For those who has also run into this issue (not specifically to DCNv2 impl), this behavior is expected due to the non-determinism of atomicAdd
. You probably want to checkout this commit and play with nondet_tol
when doing gradcheck.
from dcnv2.
HI, I encountered this problem, could anyone help me out here, thks :-)
xxzx@DeskPC:~/Desktop/DCNv2$ python3 test.py torch.Size([2, 64, 128, 128]) torch.Size([20, 32, 7, 7]) torch.Size([20, 32, 7, 7]) torch.Size([20, 32, 7, 7]) 0.971507, 1.943014 0.971507, 1.943014 Zero offset passed /usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py:170: 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 ' check_gradient_dpooling: True Traceback (most recent call last): File "test.py", line 265, in <module> check_gradient_dconv() File "test.py", line 97, in check_gradient_dconv eps=1e-3, atol=1e-4, rtol=1e-2)) File "/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py", line 208, in gradcheck return fail_test('Backward is not reentrant, i.e., running backward with same ' File "/usr/local/lib/python3.5/dist-packages/torch/autograd/gradcheck.py", line 185, in fail_test raise RuntimeError(msg) RuntimeError: Backward is not reentrant, i.e., running backward with same input and grad_output multiple times gives different values, although analytical gradient matches numerical gradient
can you solve it?
how?
I meet the same error......
from dcnv2.
Related Issues (20)
- Fail to export ONNX model
- 关于编译报错的问题
- How can I add 'groups' into deformable conv?
- difference between DCNv2 and deform_conv2d in torchvision HOT 3
- ATen/cuda/CUDAContext.h
- DCNv2 python setup.py build develop give Error
- error: command 'g++' failed with exit status 1 HOT 4
- error: command 'g++' failed with exit status 1 HOT 1
- error: ‘THFloatBlas_gemv’ was not declared in this scope HOT 1
- module '_ext' has no attribute 'dcn_v2_forward'
- Build error parameter packs not expanded with ‘...’
- The repository need an update with the newer versions of pytorch HOT 1
- > > > pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu110/torch_nightly.html
- There is a problem with the code in gnn_parse.py
- TH/TH.h: No such file or directory HOT 7
- ‘THFloatBlas_gemv’ was not declared in this scope
- pytorch version problem HOT 1
- I've already installed DCNv2, but it's still marked red HOT 1
- ImportError: dynamic module does not define module export function (PyInit__ext)
- error: command 'g++' failed with exit status 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcnv2.