We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 538ba18 commit 7e7c9bbCopy full SHA for 7e7c9bb
1 file changed
tutorial-contents/301_regression.py
@@ -37,12 +37,12 @@ def forward(self, x):
37
net = Net(n_feature=1, n_hidden=10, n_output=1) # define the network
38
print(net) # net architecture
39
40
-optimizer = torch.optim.SGD(net.parameters(), lr=0.5)
+optimizer = torch.optim.SGD(net.parameters(), lr=0.2)
41
loss_func = torch.nn.MSELoss() # this is for regression mean squared loss
42
43
plt.ion() # something about plotting
44
45
-for t in range(100):
+for t in range(200):
46
prediction = net(x) # input x and predict based on x
47
48
loss = loss_func(prediction, y) # must be (1. nn output, 2. target)
0 commit comments