(self, inputs: torch.Tensor)
| 61 | self.conv = nn.Conv1d(self.channels, self.out_channels, 3, padding=1) |
| 62 | |
| 63 | def forward(self, inputs: torch.Tensor) -> torch.Tensor: |
| 64 | assert inputs.shape[1] == self.channels |
| 65 | if self.use_conv_transpose: |
| 66 | return self.conv(inputs) |
| 67 | |
| 68 | outputs = F.interpolate(inputs, scale_factor=2.0, mode="nearest") |
| 69 | |
| 70 | if self.use_conv: |
| 71 | outputs = self.conv(outputs) |
| 72 | |
| 73 | return outputs |
| 74 | |
| 75 | |
| 76 | class Upsample2D(nn.Module): |
nothing calls this directly
no test coverage detected