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

Method __init__

SRGAN/models.py:46–63  ·  view source on GitHub ↗
(self,in_channels)

Source from the content-addressed store, hash-verified

44
45class ResidualBlock(torch.nn.Module):
46 def __init__(self,in_channels):
47 super(ResidualBlock, self).__init__()
48 self.block1 = ConvBlock(
49 in_channels,
50 in_channels,
51 kernel_size = (3,3),
52 stride = (1,1),
53 padding = (1,1)
54 )
55 #block2不使用激活函数
56 self.block2 = ConvBlock(
57 in_channels,
58 in_channels,
59 kernel_size = (3,3),
60 stride = (1,1),
61 padding = (1,1),
62 use_act = False
63 )
64 def forward(self,x):
65 out = self.block1(x)
66 out = self.block2(out)

Callers

nothing calls this directly

Calls 2

ConvBlockClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected