Skip to content

Instantly share code, notes, and snippets.

@omarsar
Created December 22, 2019 14:11
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 omarsar/152eaf63c9df1d95f5fd124c6bd43044 to your computer and use it in GitHub Desktop.
Save omarsar/152eaf63c9df1d95f5fd124c6bd43044 to your computer and use it in GitHub Desktop.
## loss function
criterion = nn.MSELoss()
## optimizer algorithm
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment