We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9219526 commit 2bfebb0Copy full SHA for 2bfebb0
tutorials/01-basics/pytorch_basics/main.py
@@ -23,9 +23,9 @@
23
# ================================================================== #
24
25
# Create tensors.
26
-x = torch.tensor(1, requires_grad=True)
27
-w = torch.tensor(2, requires_grad=True)
28
-b = torch.tensor(3, requires_grad=True)
+x = torch.tensor(1., requires_grad=True)
+w = torch.tensor(2., requires_grad=True)
+b = torch.tensor(3., requires_grad=True)
29
30
# Build a computational graph.
31
y = w * x + b # y = 2 * x + 3
0 commit comments