Last active
September 7, 2020 16:10
-
-
Save MLWhiz/c19a4c8ac50300d20dc313b88fc7f414 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class myCustomNeuralNet(nn.Module): | |
def __init__(self): | |
super().__init__() | |
# Define all Layers Here | |
self.lin1 = myCustomLinearLayer(784,10) | |
def forward(self, x): | |
# Connect the layer Outputs here to define the forward pass | |
x = self.lin1(x) | |
return x | |
x = torch.randn((100,784)) | |
model = myCustomNeuralNet() | |
model(x).size() | |
------------------------------------------ | |
torch.Size([100, 10]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment