Skip to content

Instantly share code, notes, and snippets.

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