Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created August 19, 2020 04:18
Show Gist options
  • Save amankharwal/3a4ea8f9d9027f567ffdb93e7bec2aef to your computer and use it in GitHub Desktop.
Save amankharwal/3a4ea8f9d9027f567ffdb93e7bec2aef to your computer and use it in GitHub Desktop.
import torch
from torch.autograd import Variable
class linearRegression(torch.nn.Module):
def __init__(self, inputSize, outputSize):
super(linearRegression, self).__init__()
self.linear = torch.nn.Linear(inputSize, outputSize)
def forward(self, x):
out = self.linear(x)
return out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment