# Note that these are constants, we are not going to update them X = torch.tensor(df[["area", "age"]].values, dtype=torch.float32) Y = torch.tensor(df[["price"]].values, dtype=torch.float32) # These "require_grad" So they are trainable weights. W = torch.rand(size=(2, 1), requires_grad=True) B = torch.rand(1, requires_grad=True)