-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
grid calculation for the 3rd prediction layer in #142
Comments
Same issue for me. |
I have got the same error. Have you guys solved it?? @ayooshkathuria @Shashank-Holla @arunm8489 |
is this an issue with using latest version of pytorch? |
it is not as I have ran with pytorch 4.0 |
I found the 608 number that doesn't divide by 52 comes from the first block in the yolo.cfg; "net". If you change the width and height values there to 624 it all works. |
pytorch-yolo-v3/util.py
Line 27 in fbb4ef9
grid_size calculation in the predict_transform function.
For the stride and grid_size for 3rd prediction layer, the inp_dim is 608 and prediction.size(2) is 52. With floor division, stride is calculated as 11 (608 // 52) and grid_size is calculated as 55 (608 // 11).
But the desired grid_size for the 3rd prediction layer is 52.
With grid_size as 55, prediction reshape is failing with below error-
RuntimeError: shape '[1, 255, 3025]' is invalid for input of size 689520
The text was updated successfully, but these errors were encountered: