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

local variable 'stride' referenced before assignment #85

Open
Ri-Bai opened this issue Jun 17, 2022 · 2 comments
Open

local variable 'stride' referenced before assignment #85

Ri-Bai opened this issue Jun 17, 2022 · 2 comments

Comments

@Ri-Bai
Copy link

Ri-Bai commented Jun 17, 2022

return flops * img_size[0] / stride * img_size[1] / stride

UnboundLocalError: local variable 'stride' referenced before assignment

@zhoujialos
Copy link

在if上添加一行stride=max(int(model.stride.max()), 32) if hasattr(model, 'stride') else 32试试

@kawa11
Copy link

kawa11 commented Sep 29, 2022

相同问题

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

3 participants