Last active
August 3, 2021 08:11
-
-
Save konverner/e75a32c672c6c8bd22b6f893f1002272 to your computer and use it in GitHub Desktop.
Get a number of parameters in pytorch model
This file contains 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
print(sum(p.numel() for p in model.parameters() if p.requires_grad)*NUM_MODELS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment