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

Check param count #54

Closed
voldemortX opened this issue Oct 22, 2021 · 2 comments
Closed

Check param count #54

voldemortX opened this issue Oct 22, 2021 · 2 comments

Comments

@voldemortX
Copy link

voldemortX commented Oct 22, 2021

@lucastabelini Hi again! I ran a parameter count with thop on PolyLaneNet (EfficientNetB0), and got 0.87M, do you have a official number recorded on this? I'm not sure if thop is correct about EfficientNet, since the mac count is wrong (< 1G).

I copied speed.py from LaneATT.

@lucastabelini
Copy link
Owner

It seems thop doesn't give accurate results for EfficientNet (you can see on its output that it ignores many kinds of layers). However, there's a simpler way to get the parameter count:

pytorch_total_params = sum(p.numel() for p in model.parameters())

This gives me around 4M parameters.

@voldemortX
Copy link
Author

Thanks! I got it.

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

2 participants