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

About the loss #4

Closed
Charlottecuc opened this issue Jun 14, 2022 · 4 comments
Closed

About the loss #4

Charlottecuc opened this issue Jun 14, 2022 · 4 comments

Comments

@Charlottecuc
Copy link

Hi. Could you kindly share your training loss of the model (maybe a tensorboard picture)? Thank you very much.

@yl4579
Copy link
Owner

yl4579 commented Jun 14, 2022

image

@yl4579 yl4579 closed this as completed Jun 14, 2022
@Ruinmou
Copy link

Ruinmou commented Jun 15, 2022

Why are there negative values? Shouldn't loss be positive in general?
WeChat  @Image_20220615150238
@yl4579

@yl4579
Copy link
Owner

yl4579 commented Jun 15, 2022

@hai8023 This happens when a lot of blank tokens appear in the targets for CTC loss. You need to check your labels to make sure it doesn't contain the space ( ).
However, even if you don't have it, the optimal CTC loss will be negative because the blank token was added to the beginning and the end of the speech to indicate silence before and after the speech. This is intended behavior unless your audio is trimmed to have no silence at the beginning and the end of the speech. If you don't do this, the loss won't be negative, but it may not be able to recognize the silence at the beginning and the end of the speech.

Technically speaking, the padding token at the beginning and the end be <SOS> and <EOS> instead, but for voice conversion application, the input data is randomly sliced and does not form a sentence, so we abuse the notation and use to represent the silence which is what it meant to be used in CTC loss.

For more explanation, please see https://discuss.pytorch.org/t/negative-ctc-loss/79548/5

@Ruinmou
Copy link

Ruinmou commented Jun 15, 2022

Thank you very much for your reply

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

3 participants