Process and fuse input features.
(self, x0: torch.Tensor, x1: torch.Tensor | None = None)
| 170 | self.skip_add = nn.quantized.FloatFunctional() |
| 171 | |
| 172 | def forward(self, x0: torch.Tensor, x1: torch.Tensor | None = None) -> torch.Tensor: |
| 173 | """Process and fuse input features.""" |
| 174 | x = x0 |
| 175 | |
| 176 | if x1 is not None: |
| 177 | res = self.resnet1(x1) |
| 178 | x = self.skip_add.add(x, res) |
| 179 | |
| 180 | x = self.resnet2(x) |
| 181 | x = self.deconv(x) |
| 182 | x = self.out_conv(x) |
| 183 | |
| 184 | return x |
| 185 | |
| 186 | @staticmethod |
| 187 | def _residual_block(num_features: int, batch_norm: bool): |
nothing calls this directly
no outgoing calls
no test coverage detected