Created
May 3, 2018 21:58
-
-
Save conormm/4582e52523f96157d62f033b8f8c8481 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 MoonsModel(nn.Module): | |
def __init__(self, n_features, n_neurons): | |
super(MoonsModel, self).__init__() | |
self.hidden = nn.Linear(in_features=n_features, out_features=n_neurons) | |
self.out_layer = nn.Linear(in_features=n_neurons, out_features=2) | |
def forward(self, X): | |
out = F.relu(self.hidden(X)) | |
out = F.sigmoid(self.out_layer(out)) | |
return out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment