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

Method forward

pix2pix/net/Generator.py:64–84  ·  view source on GitHub ↗
(self,x)

Source from the content-addressed store, hash-verified

62 torch.nn.Tanh()
63 )
64 def forward(self,x):
65 d1 = self.initial_down(x)
66 d2 = self.down1(d1)
67 d3 = self.down2(d2)
68 d4 = self.down3(d3)
69 d5 = self.down4(d4)
70 d6 = self.down5(d5)
71 d7 = self.down6(d6)
72
73 bottleneck = self.bottleneck(d7)
74
75 u1 = self.up1(bottleneck)
76 u2 = self.up2(torch.cat([u1,d7],dim=1))
77 u3 = self.up3(torch.cat([u2,d6],dim=1))
78 u4 = self.up4(torch.cat([u3,d5],dim=1))
79 u5 = self.up5(torch.cat([u4,d4],dim=1))
80 u6 = self.up6(torch.cat([u5,d3],dim=1))
81 u7 = self.up7(torch.cat([u6,d2],dim=1))
82
83 final_up = self.final_up(torch.cat([u7,d1],dim=1))
84 return final_up
85
86
87if __name__ == '__main__':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected