MCPcopy Create free account
hub / github.com/GasaiYU/PartRM / forward

Method forward

core/unet.py:218–232  ·  view source on GitHub ↗
(self, x, xs)

Source from the content-addressed store, hash-verified

216 self.upsample = nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=1, padding=1)
217
218 def forward(self, x, xs):
219
220 for attn, net in zip(self.attns, self.nets):
221 res_x = xs[-1]
222 xs = xs[:-1]
223 x = torch.cat([x, res_x], dim=1)
224 x = net(x)
225 if attn:
226 x = attn(x)
227
228 if self.upsample:
229 x = F.interpolate(x, scale_factor=2.0, mode='nearest')
230 x = self.upsample(x)
231
232 return x
233
234
235# it could be asymmetric!

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected