Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss of Tacotron #725

Closed
chankl3579 opened this issue Apr 5, 2021 · 2 comments
Closed

Loss of Tacotron #725

chankl3579 opened this issue Apr 5, 2021 · 2 comments

Comments

@chankl3579
Copy link

May I ask what actually is the loss while training the synthesizers.

For the new Pytorch repo, as mentioned in #653 , the loss is the sum of:

  1. L1 loss +L2 loss of decoder output
  2. L2 loss of Mel spectrogram after Post-Net
  3. Cross entropy of Stop Token

I can also see it in the code:
# Backward pass
m1_loss = F.mse_loss(m1_hat, mels) + F.l1_loss(m1_hat, mels)
m2_loss = F.mse_loss(m2_hat, mels)
stop_loss = F.binary_cross_entropy(stop_pred, stop)
loss = m1_loss + m2_loss + stop_loss

However, what is the loss in the old Tensorflow repo?
In the original paper it simply mentioned
"We extend [15] by augmenting the L2 loss on the predicted spectrogram with an additional L1 loss. "
The RTVC thesis it is stated that
"The loss function is the L2 loss between the predicted and ground truth mel spectrograms. "

In the code there are some items related to loss including
eval_losses, before_losses, after_losses, stop_token_losses, linear_losses, linear_loss
Are they related to the loss? Or did I miss the lines about the loss?

@ghost
Copy link

ghost commented Apr 9, 2021

It is documented here: https://github.com/Rayhane-mamah/Tacotron-2/wiki/Spectrogram-Feature-prediction-network#training

Our old Tensorflow code in this repo modified the Rayhane-mamah code to add L1 loss of decoder output. That code is obsolete and no longer supported. Please file an issue in https://github.com/Rayhane-mamah/Tacotron-2 if you have more questions about the Tensorflow synthesizer.

@chankl3579
Copy link
Author

Thanks for the reference link !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant