Skip to content

Commit

Permalink
Removed Generator_WGAN
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-kev committed May 3, 2024
1 parent 345e9db commit 1635e25
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 25 deletions.
25 changes: 0 additions & 25 deletions nn_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,6 @@ def forward(self, x):
'Forward pass'
output = self.network(x)
return output.view(-1, 1).squeeze(0)

class Discriminator_WGAN(nn.Module):
def __init__(self, n_filters):
super().__init__()

self.network = nn.Sequential(
nn.Conv2d(1, n_filters // 4, 4, 2, 1, bias=False),
nn.LeakyReLU(0.2),
nn.Conv2d(n_filters // 4, n_filters // 2, 4, 2, 1, bias=False),
nn.BatchNorm2d(n_filters // 2),
nn.LeakyReLU(0.2),
nn.Conv2d(n_filters // 2, n_filters, 3, 2, 0, bias=False),
nn.BatchNorm2d(n_filters),
nn.LeakyReLU(0.2),
nn.Conv2d(n_filters, 1, 3, 1, 0, bias=False),
)

self.linear = nn.Linear(1, 1)

def forward(self, x):
'Forward pass'
output = self.network(x)
output = output.view(-1, 1).squeeze(0)
output = self.linear(output)
return output

# Generate noise from normal distribution
def create_noise(batch_size, z_size):
Expand Down
Loading

0 comments on commit 1635e25

Please sign in to comment.