Skip to content

Instantly share code, notes, and snippets.

@nbertagnolli
Created March 1, 2020 22:58
Show Gist options
  • Save nbertagnolli/abdcdb262afe4bed1b527a61ac9a1b39 to your computer and use it in GitHub Desktop.
Save nbertagnolli/abdcdb262afe4bed1b527a61ac9a1b39 to your computer and use it in GitHub Desktop.
Even number GAN generator
class Generator(nn.Module):
def __init__(self, input_length: int):
super(Generator, self).__init__()
self.dense_layer = nn.Linear(int(input_length), int(input_length))
self.activation = nn.Sigmoid()
def forward(self, x):
return self.activation(self.dense_layer(x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment