-
Notifications
You must be signed in to change notification settings - Fork 77
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
an illegal memory access was encountered #3
Comments
Yes, there has been some problems with last version (0.0.7), because there was a typo, which made this error occur when H and W where not the same (I did not ran tests thoroughly enough, I'm so sorry! 😕 ) I uploaded a new version (0.0.8) this morning, and it should be solved, so you should try to upgrade your correlation sampler. |
Thank you so much for your reply!
Actually, I indeed used the updated version. And I tested the version 0.0.8
again, however, the error still occurs. And it is weird that the error
occurs randomly, sometimes it occurs after several hundreds of iterations,
but sometimes just several iterations. I checked your code, and it seems
like that there is no bug. In fact, I wanna use your code in PWC-Net
https://github.com/NVlabs/PWC-Net/tree/master/PyTorch, because the provided
correlation layer is based on pytorch 0.2, while my project is based on
0.4. I really have no idea about it. Anyway, thank you and thank you for
releasing this code.
Clément Pinard <notifications@github.com> 于2018年8月23日周四 下午10:04写道:
… Yes, there has been some problems with last version (0.0.7), because there
was a typo, which made this error occur when H and W where not the same (I
did not ran tests thoroughly enough, I'm so sorry! 😕 )
I uploaded a new version (0.0.8) this morning, and it should be solved, so
you should try to upgrade your correlation sampler.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aj6rwR9uUj8vFr8x5P6NdZ4giVzc0jsXks5uTpowgaJpZM4WJXsX>
.
|
Hi, I have solved this problem. There is indeed no bug in your code! Because the output of the forward in the correlation layer is a 5d tensor, then I transform it to a 4d one in forward in the spatial_correlation_sampler.py. However, I forgot to transform the the grad_output (4d tensor) to a 5d tensor in backward. Actually, I don't know why the the missing of transformation from 4d tensor(nx(phxpw)xhxw) to a 5d one(nxphxpwxhxw) could cause the problem, since the order of the elements does not change at all. Anyway, the problem has been solved. Thank you again. |
That's weird, the Anyway I'm glad it could work for you in the end ! |
Hi, when I use your code in pytorch 0.4.1, cuda 9.0, an error occurs:
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1532571933727/work/aten/src/THC/THCCachingHostAllocator.cpp line=271 error=77 : an illegal memory access was encountered
if I do not use the correlation layer, that would be ok.
Do you have any idea? Thank you!
The text was updated successfully, but these errors were encountered: