Created
December 4, 2018 00:30
-
-
Save albertlai431/56c378070b8d3a85afeb5c2dccb3cebf to your computer and use it in GitHub Desktop.
Forward Propagation
This file contains 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
def forward(self, x): | |
#Convolution 1 | |
out = self.cnn1(x) | |
out = self.relu1(out) | |
#Max pool 1 | |
out = self.maxpool1(out) | |
#Convolution 2 | |
out = self.cnn2(out) | |
out = self.relu2(out) | |
#Max pool 2 | |
out = self.maxpool2(out) | |
#Resize | |
out = out.view(out.size(0), -1) | |
#Dropout | |
out = self.dropout(out) | |
#Fully connected 1 | |
out = self.fc1(out) | |
return out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment