(self, decoder_output, target)
| 156 | raise NotImplementedError |
| 157 | |
| 158 | def l1_loss(self, decoder_output, target): |
| 159 | # decoder_output : B x T x n_mel |
| 160 | # target : B x T x n_mel |
| 161 | l1_loss = F.l1_loss(decoder_output, target, reduction='none') |
| 162 | weights = self.weights_nonzero_speech(target) |
| 163 | l1_loss = (l1_loss * weights).sum() / weights.sum() |
| 164 | return l1_loss |
| 165 | |
| 166 | def ssim_loss(self, decoder_output, target, bias=6.0): |
| 167 | # decoder_output : B x T x n_mel |
no test coverage detected