MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / Discrimiantor

Class Discrimiantor

Adversarial_AutoEncoder/net/Discriminator.py:11–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9from torchinfo import summary
10
11class Discrimiantor(torch.nn.Module):
12 def __init__(self,in_features = 128):
13 super(Discrimiantor, self).__init__()
14 self.dense = torch.nn.Sequential(
15 torch.nn.Linear(in_features = in_features,out_features=256),
16 torch.nn.ReLU(),
17
18 torch.nn.Linear(in_features=256,out_features=512),
19 torch.nn.ReLU(),
20
21 torch.nn.Linear(in_features = 512,out_features=256),
22 torch.nn.ReLU(),
23
24 torch.nn.Linear(in_features = 256,out_features=128),
25 torch.nn.ReLU(),
26
27 torch.nn.Linear(in_features = 128,out_features=1),
28 torch.nn.Sigmoid()
29 )
30 def forward(self,x):
31 out = self.dense(x)
32 return out
33
34if __name__ == '__main__':
35 model = Discrimiantor(in_features=128)

Callers 2

train.pyFile · 0.90
Discriminator.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected