MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / InputInjection

Class InputInjection

segmentation/backbones/cgnet.py:171–183  ·  view source on GitHub ↗

Downsampling module for CGNet.

Source from the content-addressed store, hash-verified

169
170
171class InputInjection(nn.Module):
172 """Downsampling module for CGNet."""
173
174 def __init__(self, num_downsampling):
175 super(InputInjection, self).__init__()
176 self.pool = nn.ModuleList()
177 for i in range(num_downsampling):
178 self.pool.append(nn.AvgPool2d(3, stride=2, padding=1))
179
180 def forward(self, x):
181 for pool in self.pool:
182 x = pool(x)
183 return x
184
185
186@BACKBONES.register_module()

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected