Method
__init__
(
self,
in_channels,
with_conv,
compress_time=False,
)
Source from the content-addressed store, hash-verified
| 530 | |
| 531 | class Upsample3D(nn.Module): |
| 532 | def __init__( |
| 533 | self, |
| 534 | in_channels, |
| 535 | with_conv, |
| 536 | compress_time=False, |
| 537 | ): |
| 538 | super().__init__() |
| 539 | self.with_conv = with_conv |
| 540 | if self.with_conv: |
| 541 | self.conv = torch.nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1) |
| 542 | self.compress_time = compress_time |
| 543 | |
| 544 | def forward(self, x): |
| 545 | if self.compress_time and x.shape[2] > 1: |
Tested by
no test coverage detected