Method
__init__
(
self,
in_channels: int,
out_channels: int,
kernel_size: int = 3,
stride: int = 1,
padding: int = 1,
compress_time: bool = False,
)
Source from the content-addressed store, hash-verified
| 56 | |
| 57 | class Upsample3D(torch.nn.Module): |
| 58 | def __init__( |
| 59 | self, |
| 60 | in_channels: int, |
| 61 | out_channels: int, |
| 62 | kernel_size: int = 3, |
| 63 | stride: int = 1, |
| 64 | padding: int = 1, |
| 65 | compress_time: bool = False, |
| 66 | ) -> None: |
| 67 | super().__init__() |
| 68 | self.conv = torch.nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, stride=stride, padding=padding) |
| 69 | self.compress_time = compress_time |
| 70 | |
| 71 | def forward(self, inputs: torch.Tensor, xq: torch.Tensor) -> torch.Tensor: |
| 72 | if self.compress_time: |
Tested by
no test coverage detected