Apply residual block.
(self, x: torch.Tensor)
| 64 | self.shortcut = shortcut |
| 65 | |
| 66 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 67 | """Apply residual block.""" |
| 68 | delta_x = self.residual(x) |
| 69 | |
| 70 | if self.shortcut is not None: |
| 71 | x = self.shortcut(x) |
| 72 | |
| 73 | return x + delta_x |
| 74 | |
| 75 | |
| 76 | def residual_block_2d( |
nothing calls this directly
no outgoing calls
no test coverage detected