Skip to content

Instantly share code, notes, and snippets.

@ayoubbenaissa
Created February 21, 2019 18:08
Show Gist options
  • Save ayoubbenaissa/81e02ffc0fb15bd09d144f55b42d79eb to your computer and use it in GitHub Desktop.
Save ayoubbenaissa/81e02ffc0fb15bd09d144f55b42d79eb to your computer and use it in GitHub Desktop.
pytorch tuto
#Loss function:
criterion = nn.MSELoss()
#optimizer:
learning_rate = 0.01
optimizer = torch.optim.SGD(model.parameters(), lr=learning_rate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment