Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created July 17, 2020 17:14
Show Gist options
  • Save prateekjoshi565/f0bc5fdf47bae4d5dc5065bc24b86c57 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/f0bc5fdf47bae4d5dc5065bc24b86c57 to your computer and use it in GitHub Desktop.
# freeze all the parameters
for param in bert.parameters():
param.requires_grad = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment