Created
March 1, 2020 23:08
-
-
Save nbertagnolli/3c95816322971c5991d71280063de0ed to your computer and use it in GitHub Desktop.
A basic discriminator for a simple GAN
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
class Discriminator(nn.Module): | |
def __init__(self, input_length: int): | |
super(Discriminator, self).__init__() | |
self.dense = nn.Linear(int(input_length), 1); | |
self.activation = nn.Sigmoid() | |
def forward(self, x): | |
return self.activation(self.dense(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment