(self, x, xs)
| 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! |
nothing calls this directly
no outgoing calls
no test coverage detected