Skip to content

Instantly share code, notes, and snippets.

@vsay01
Created January 22, 2020 02:03
Show Gist options
  • Save vsay01/c78e5c86bab4b3911bf5e88ef1a5a680 to your computer and use it in GitHub Desktop.
Save vsay01/c78e5c86bab4b3911bf5e88ef1a5a680 to your computer and use it in GitHub Desktop.
Define criterion and loss function
#define loss function and optimizer
criterion = nn.NLLLoss()
optimizer = optim.Adam(model.parameters(), lr=0.001)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment