Created
March 2, 2021 08:24
-
-
Save dangne/4be0ce1ef0afcc4ac4e4d6ef10ec393f 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
def count_parameters(model): | |
return 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