Skip to content

Instantly share code, notes, and snippets.

@MLWhiz
Created September 7, 2020 14:46
Show Gist options
  • Save MLWhiz/768fbe938fc90183ad33a23c478ee9d3 to your computer and use it in GitHub Desktop.
Save MLWhiz/768fbe938fc90183ad33a23c478ee9d3 to your computer and use it in GitHub Desktop.
class myNeuralNet(nn.Module):
def __init__(self):
super().__init__()
# Define all Layers Here
self.lin1 = nn.Linear(784, 30)
self.lin2 = nn.Linear(30, 10)
def forward(self, x):
# Connect the layer Outputs here to define the forward pass
x = self.lin1(x)
x = self.lin2(x)
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment