MCPcopy Create free account
hub / github.com/bingchenlll/FastGAN-pytorch / SEBlock

Class SEBlock

models.py:74–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73
74class SEBlock(nn.Module):
75 def __init__(self, ch_in, ch_out):
76 super().__init__()
77
78 self.main = nn.Sequential( nn.AdaptiveAvgPool2d(4),
79 conv2d(ch_in, ch_out, 4, 1, 0, bias=False), Swish(),
80 conv2d(ch_out, ch_out, 1, 1, 0, bias=False), nn.Sigmoid() )
81
82 def forward(self, feat_small, feat_big):
83 return feat_big * self.main(feat_small)
84
85
86class InitLayer(nn.Module):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected