r""" This method takes tensor x as input and performs downsampling if required. Then it applies in convolution layer, a sequence of residual blocks, and out convolutional layer.
(self, x: torch.Tensor)
| 541 | self.out_conv = nn.Conv2d(mid_channels, out_channels, kernel_size=1) |
| 542 | |
| 543 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 544 | r""" |
| 545 | This method takes tensor x as input and performs downsampling if required. Then it applies in convolution |
| 546 | layer, a sequence of residual blocks, and out convolutional layer. |
| 547 | """ |
| 548 | if self.downsample is not None: |
| 549 | x = self.downsample(x) |
| 550 | |
| 551 | x = self.in_conv(x) |
| 552 | x = self.resnets(x) |
| 553 | x = self.out_conv(x) |
| 554 | |
| 555 | return x |
| 556 | |
| 557 | |
| 558 | class LightAdapterResnetBlock(nn.Module): |
nothing calls this directly
no test coverage detected