This file contains 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
date | value | |
---|---|---|
11/1/15 | 300 | |
12/1/15 | 378.375 | |
1/1/16 | 333.7916667 | |
2/1/16 | 330.7696078 | |
3/1/16 | 347.2945545 | |
4/1/16 | 363.2814465 | |
5/1/16 | 323.4774096 | |
6/1/16 | 288.9470878 | |
7/1/16 | 284.7981057 |
This file contains 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
CNN = SimpleCNN() | |
trainNet(CNN, batch_size=32, n_epochs=5, learning_rate=0.001) |
This file contains 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
#Import the optim module from the pytorch package | |
import torch.optim as optim | |
#Initialize an optimizer object | |
learning_rate = 0.001 | |
optimizer = optim.Adam(net.parameters(), lr=learning_rate) | |
#Set the parameter gradients to 0 and take a step (as part of a training loop) | |
for epoch in num_epochs: | |
train(...) |
OlderNewer