Skip to content

Instantly share code, notes, and snippets.

@b0noI
Created October 26, 2021 16:59
Show Gist options
  • Save b0noI/0c8de83b9d4b4c6a0e2e1fa1e9989028 to your computer and use it in GitHub Desktop.
Save b0noI/0c8de83b9d4b4c6a0e2e1fa1e9989028 to your computer and use it in GitHub Desktop.
import torch
torch.manual_seed(2021)
w = torch.rand(1, requires_grad=True, dtype=torch.float64)
b = torch.rand(1, requires_grad=True, dtype=torch.float64)
def model(X):
return X * w + b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment