r""" This method takes tensor x as input and performs operations downsampling and convolutional layers if the self.downsample and self.in_conv properties of AdapterBlock model are specified. Then it applies a series of residual blocks to the input tensor.
(self, x: torch.Tensor)
| 420 | ) |
| 421 | |
| 422 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 423 | r""" |
| 424 | This method takes tensor x as input and performs operations downsampling and convolutional layers if the |
| 425 | self.downsample and self.in_conv properties of AdapterBlock model are specified. Then it applies a series of |
| 426 | residual blocks to the input tensor. |
| 427 | """ |
| 428 | if self.downsample is not None: |
| 429 | x = self.downsample(x) |
| 430 | |
| 431 | if self.in_conv is not None: |
| 432 | x = self.in_conv(x) |
| 433 | |
| 434 | x = self.resnets(x) |
| 435 | |
| 436 | return x |
| 437 | |
| 438 | |
| 439 | class AdapterResnetBlock(nn.Module): |
nothing calls this directly
no test coverage detected