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