Last active
September 15, 2023 09:28
-
-
Save antferdom/d2edec70a769aa5ec23e1a1f72c25525 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
model_size = sum( | |
p.numel() * p.element_size() for p in model.parameters() if p.requires_grad | |
) | |
model_params = sum(p.numel() for p in model.parameters() if p.requires_grad) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment