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

Method __init__

fc-CGANCode/models.py:12–34  ·  view source on GitHub ↗
(self,in_features = 100,W = 28,H = 28)

Source from the content-addressed store, hash-verified

10
11class Generator(torch.nn.Module):
12 def __init__(self,in_features = 100,W = 28,H = 28):
13 super(Generator, self).__init__()
14 self.fc_layer_1 = torch.nn.Sequential(
15 torch.nn.Linear(in_features = in_features,out_features=256),
16 torch.nn.BatchNorm1d(num_features=256),
17 torch.nn.ReLU()
18 )
19 self.fc_layer_2 = torch.nn.Sequential(
20 torch.nn.Linear(in_features=10,out_features=256),
21 torch.nn.BatchNorm1d(num_features=256),
22 torch.nn.ReLU()
23 )
24 self.fc_layer_3 = torch.nn.Sequential(
25 torch.nn.Linear(in_features=512,out_features=512),
26 torch.nn.BatchNorm1d(num_features=512),
27 torch.nn.ReLU()
28 )
29 self.fc_layer_4 = torch.nn.Sequential(
30 torch.nn.Linear(in_features=512,out_features=1024),
31 torch.nn.BatchNorm1d(num_features=1024),
32 torch.nn.ReLU()
33 )
34 self.fc_layer_final = torch.nn.Linear(in_features=1024,out_features=H * W)
35
36 def forward(self,input,label):
37 x = self.fc_layer_1(input)

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected