MCPcopy Create free account
hub / github.com/RolandGao/RegSeg / __init__

Method __init__

competitor_blocks.py:102–109  ·  view source on GitHub ↗
(self, in_chan, out_chan)

Source from the content-addressed store, hash-verified

100class FeatureSelectionModule(nn.Module):
101 # FaPN paper
102 def __init__(self, in_chan, out_chan):
103 super(FeatureSelectionModule, self).__init__()
104 self.conv_atten=nn.Sequential(
105 nn.AdaptiveAvgPool2d(1),
106 nn.Conv2d(in_chan, in_chan, kernel_size=1, bias=False),
107 nn.Sigmoid()
108 )
109 self.conv = nn.Conv2d(in_chan, out_chan, kernel_size=1, bias=False)
110
111 def forward(self, x):
112 x = x*self.conv_atten(x) + x

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected