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

Class ResidualBlock

Code/net/Generator.py:26–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 return self.conv(x)
25
26class ResidualBlock(torch.nn.Module):
27 def __init__(self,channels):
28 super(ResidualBlock, self).__init__()
29 self.block = torch.nn.Sequential(
30 ConvBlock(channels,channels,kernel_size = 3,padding = 1),
31 ConvBlock(channels,channels,use_act=False,kernel_size = 3,padding = 1),
32 )
33 def forward(self,x):
34 return x + self.block(x)
35
36class Generator(torch.nn.Module):
37 def __init__(self,img_channels,num_features = 64,num_residual=9):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected