-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Replace assert with ValueError in AnchorGenerator #2947
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
Comments
Hi, Thanks for opening this issue. I believe the code snippet that you included is not supposed to work, and it only worked before by accident (although potentially leading to worse results) Indeed, you need to pass a custom The assert was added in #2722 as the without the assert users were using it incorrectly, which could lead to worse results. The expected way to construct the model with mobilenet so that it works is illustrated in the documentation vision/torchvision/models/detection/faster_rcnn.py Lines 109 to 141 in 6b071be
We would be glad to accept a PR removing the |
Hi, Thank you for answering this. |
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug
I think with the Retina Net PR, there was an update to anchor utils.
My old code still works fine on torchvision 0.7 and pytorch 1.6. But on upgrading to 0.8 it doesn't.
I am not sure if this was BC Breaking change.
To Reproduce
Steps to reproduce the behavior:
I get an assertion error from this line
Expected behavior
It should work fine, I think an upgrade to torchvision should not break Anchor utils for FRCNN.
Environment
conda
,pip
, source): condaAdditional context
ValueError
with suitable messages ? I cannot debug at all withassert
errors.The text was updated successfully, but these errors were encountered: