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

Method forward

competitor_blocks.py:164–179  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

162 self.classifier=nn.Conv2d(128, num_classes, 1)
163
164 def forward(self, x):
165 x8,x16= x["8"], x["16"]
166
167 avg=self.avg_pool(x16)
168 avg = self.conv_avg(avg)
169 avg_up = F.interpolate(avg, size=x16.shape[-2:], mode='nearest')
170
171 x16 = self.arm16(x16)
172 x16 = x16 + avg_up
173 x16 = F.interpolate(x16, size=x8.shape[-2:], mode='nearest')
174 x16 = self.conv_head16(x16)
175
176 x=self.ffm(x8,x16)
177 x=self.conv(x)
178 x=self.classifier(x)
179 return x
180class SFNetDecoder(nn.Module):
181 def __init__(self, num_classes, channels, fpn_dim=64, fpn_dsn=False):
182 super().__init__()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected