Skip to content

Instantly share code, notes, and snippets.

@NilakshanKunananthaseelan
Last active April 22, 2022 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NilakshanKunananthaseelan/91376938a3cde6e1eb67f34f66bcdc9e to your computer and use it in GitHub Desktop.
Save NilakshanKunananthaseelan/91376938a3cde6e1eb67f34f66bcdc9e to your computer and use it in GitHub Desktop.
Model definition
import torch.nn as nn
import torch.nn.functional as F
class Net(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(10, 100)
self.fc2 = nn.Linear(100, 2)
def forward(self, x):
x = F.relu(self.fc1(x))
x = self.fc2(x)
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment