MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / forward

Method forward

models/models.py:199–217  ·  view source on GitHub ↗
(self, conv_out, segSize=None)

Source from the content-addressed store, hash-verified

197 )
198
199 def forward(self, conv_out, segSize=None):
200 conv4 = conv_out[-2]
201 conv5 = conv_out[-1]
202 ######
203 x1 = nn.functional.interpolate(conv4, size=segSize, mode='bilinear', align_corners=False)
204 ######
205 input_size = conv5.size()
206 ppm_out = [conv5]
207 for pool_scale in self.ppm:
208 ppm_out.append(nn.functional.interpolate(
209 pool_scale(conv5),
210 (input_size[2], input_size[3]),
211 mode='bilinear', align_corners=False))
212 ppm_out = torch.cat(ppm_out, 1)
213 x = self.conv_last(ppm_out)
214 x = nn.functional.interpolate(
215 x, size=segSize, mode='bilinear', align_corners=False)
216 x = nn.functional.softmax(x, dim=1)
217 return x, x1
218
219

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected