Skip to content

Instantly share code, notes, and snippets.

@jaypatravali
Created June 9, 2017 09:13
Show Gist options
  • Save jaypatravali/eda03580879c442195ead7a0ca559596 to your computer and use it in GitHub Desktop.
Save jaypatravali/eda03580879c442195ead7a0ca559596 to your computer and use it in GitHub Desktop.
print no of params in model
# get the number of model parameters
print('Number of model parameters: {}'.format(
sum([p.data.nelement() for p in model.parameters()])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment