import torch
$y = w \times x + b$
$y = 3x + 1$
w = torch.tensor(3.0, requires_grad=True)
b = torch.tensor(1.0, requires_grad=True)
print(w)
print(b)
def forward(x):
y = w*x + b
return y
x = torch.tensor(2)
forward(x)
x = torch.tensor([[4],[7]])
x
forward(x)