finish chapter 6

This commit is contained in:
Joseph Hopfmüller
2022-10-17 13:04:51 +02:00
parent 31147133b6
commit 3ce77417fe
9 changed files with 155 additions and 6 deletions

View File

@@ -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)