Skip to content
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

Open
Shashank-Holla opened this issue Mar 26, 2020 · 5 comments
Open

grid calculation for the 3rd prediction layer in #142

Shashank-Holla opened this issue Mar 26, 2020 · 5 comments

Comments

@Shashank-Holla
Copy link

stride = inp_dim // prediction.size(2)

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

@arunm8489
Copy link

Same issue for me.

@ashishgupta2598
Copy link

I have got the same error. Have you guys solved it?? @ayooshkathuria @Shashank-Holla @arunm8489

@MaxwellHogan
Copy link

is this an issue with using latest version of pytorch?

@MaxwellHogan
Copy link

is this an issue with using latest version of pytorch?

it is not as I have ran with pytorch 4.0

@nickblock
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants