finish chapter 6
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import torch
|
||||
# prediction manual
|
||||
# gradient computation autograd -> gradient computation gets replaced by backward()
|
||||
# loss computation manual
|
||||
# parameter update manual
|
||||
|
||||
# linear regression, no bias
|
||||
# f = w*x
|
||||
# f = 2*x
|
||||
|
||||
import torch
|
||||
|
||||
|
||||
X = torch.tensor([1, 2, 3, 4], dtype=torch.float32)
|
||||
Y = torch.tensor([2, 4, 6, 8], dtype=torch.float32)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user