-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add masked MSE loss #245
base: master
Are you sure you want to change the base?
Add masked MSE loss #245
Conversation
Signed-off-by: njellinas <[email protected]>
Just tried, get error TypeError: forward() missing 1 required positional argument: 'output_lengths' |
In which point did it output this error? I put an extra argument in the Tacotron2Loss forward function, but I give it as |
Trace
|
I guess you have a different codebase because this line |
Yes, I have my own modification (minor) of this repo. https://colab.research.google.com/drive/1tBOXMBNbAkS-zHDIvP3hfFEUNf-kGosd |
Oh OK then that makes sense. Look at the changes in the diffs, and apply them to your code. You are missing the last argument at criterion which must be the Mel lengths. |
Oh, sorry, somehow I missed what i copy-pasted train file and just pulled your changes to my repo. |
@njellinas Does adding the masked MSE loss improve the model? |
I noticed that you mask the outputs of the decoder, so there was no need to apply any more 'masking code'. Just in the calculation of the MSE I added a counter of the non-padded elements, changed the loss reduction to 'sum' and then divided with the counter.
Signed-off-by: njellinas [email protected]