-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Adding ROIAlign backwards for CPU #504
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
Thanks for the PR! I believe we still need to modify this file in order for the CPU dispatch to work? |
@fmassa My bad! Fixing this. |
@fmassa Fixed the python interface |
Can you make sure flake8 runs successfully on your code? CI is failing since there are some linter errors. |
@sampepose I believe the flake8 issues are on my end. I need to fix them before merging the |
@xssChauhan could you please write a small python file that tests that the gradients are indeed computed correctly? Once we know that the gradcheck is passing, I'll merge this patch. Thanks! |
@fmassa Will do so |
@fmassa Here's the error:
This is stopping me from successfully building the extension, and hence cannot access the roi_align_backwards from python interface. |
This is the error you get before even applying your patch, is that right? |
Yes. Initially thought that it was introduced by me. Then tried on the |
weird. Let me try compiling it (last time I checked it was working) |
Ok, I know what's going on. You need to have a source install from PyTorch. The bug you are facing was fixed in pytorch/pytorch#6986 |
Understood. Would install PyTorch from source. |
@fmassa Installed PyTorch from source and then tried compiling the layers branch.
|
Ok, this is due to a recent change in PyTorch that modified the behavior of I believe you can replace And sorry for the troubles getting this branch to compile, as you can see PyTorch is evolving quite fast! |
Thank you. I'll do the changes. |
Hey @fmassa Even the successful compilation does not seem to add Here are the steps that i took:
The build process throws no error. Here are a couple of implementation details:
How can i fix this? Would be grateful for the help. |
Hi, So, I believe the copying of the Can you try doing from torchvision import layers If that doesn't work, one possibility that I think that's happening is that you might need to uninstall your previous torchvision installation before installing the new one using Could you try doing |
@fmassa My bad. |
@xssChauhan is this ready for review? Did you manage to perform the gradcheck? |
@fmassa The branch is currently not passing the gradcheck. I've been working on finding the issue. My code is referenced from Caffe2 and vision's implementation of the same. |
Since this PR seems to be abandoned, I have taken the liberty to add the backwards pass for CPU in #630. |
Closing in favor of #630 |
Adding ROIAlign backwards implementation for CPU.
Implemented using vision's CUDA implementation for the same purpose.
Currently the layers branch is not compiling.