:param x: (N, C, L) :param mask: :return:
(self, x, mask)
| 261 | self.channel_masking_rate = channel_masking_rate |
| 262 | |
| 263 | def forward(self, x, mask): |
| 264 | ''' |
| 265 | :param x: (N, C, L) |
| 266 | :param mask: |
| 267 | :return: |
| 268 | ''' |
| 269 | |
| 270 | if self.channel_masking_rate > 0: |
| 271 | x = x.unsqueeze(2) |
| 272 | x = self.dropout(x) |
| 273 | x = x.squeeze(2) |
| 274 | |
| 275 | feature = self.conv_1x1(x) |
| 276 | for layer in self.layers: |
| 277 | feature = layer(feature, None, mask) |
| 278 | |
| 279 | out = self.conv_out(feature) * mask[:, 0:1, :] |
| 280 | |
| 281 | return out, feature |
| 282 | |
| 283 | |
| 284 | class Decoder(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected