Created
August 28, 2019 20:28
-
-
Save n0obcoder/8e2ffa641ce572d7ab3a901d654f3f1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Defining the Loss Function | |
| # Mean Squared Error is the most common choice of Loss Function for Linear Regression models. | |
| criterion = torch.nn.MSELoss() | |
| # Defining the Optimizer, which would update all the trainable parameters of the model, making the model learn the data distribution better and hence fit the distribution better. | |
| optimizer = torch.optim.Adam(model.parameters(), lr = 0.0005) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment