We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents de563d7 + e19eb5d commit 538ba18Copy full SHA for 538ba18
1 file changed
tutorial-contents/301_regression.py
@@ -17,8 +17,8 @@
17
y = x.pow(2) + 0.2*torch.rand(x.size()) # noisy y data (tensor), shape=(100, 1)
18
19
# torch can only train on Variable, so convert them to Variable
20
-x, y = Variable(x), Variable(y)
21
-
+#x, y = Variable(x), Variable(y)
+#The above code is depricated. Now,autograd directly supports tensors
22
# plt.scatter(x.data.numpy(), y.data.numpy())
23
# plt.show()
24
@@ -60,4 +60,4 @@ def forward(self, x):
60
plt.pause(0.1)
61
62
plt.ioff()
63
-plt.show()
+plt.show()
0 commit comments