Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created July 17, 2020 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/ddd5a70a00d77a28ca013a70d9732ad3 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/ddd5a70a00d77a28ca013a70d9732ad3 to your computer and use it in GitHub Desktop.
# optimizer from hugging face transformers
from transformers import AdamW
# define the optimizer
optimizer = AdamW(model.parameters(),
lr = 1e-5) # learning rate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment