Created
March 1, 2020 23:08
-
-
Save nbertagnolli/aa37ca06a60ff6aa7013165316010f5d 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