(self, x: torch.Tensor, input_length: torch.Tensor)
| 140 | ) |
| 141 | |
| 142 | def forward(self, x: torch.Tensor, input_length: torch.Tensor): |
| 143 | x = self.in_proj(x) |
| 144 | x = x.transpose(1, 2) |
| 145 | res = self.up_conv(x) |
| 146 | res = res.transpose(1, 2) |
| 147 | output_length = input_length * self.stride |
| 148 | return res, output_length |
| 149 | |
| 150 | |
| 151 | class RedCodec(nn.Module): |