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

Possible error when computing final loss #10

Closed
secsilm opened this issue Aug 10, 2021 · 1 comment
Closed

Possible error when computing final loss #10

secsilm opened this issue Aug 10, 2021 · 1 comment

Comments

@secsilm
Copy link

secsilm commented Aug 10, 2021

In the paper, the final loss is obtained by adding constrained loss to cross entropy:

image

But in model.py, it seems that only the constrained loss is used:

image

If I understand the paper correctly, should loss = const_loss be changed to loss += const_loss?

@SaiKeshav
Copy link
Collaborator

Hi, unfortunately, this does seem to be a bug in the constrained training portion of the code - thanks for pointing it out. It still seems to work because the constraints are applied after the warmup phase where the model is already trained with the Cross-Entropy loss and hence has good knowledge of it, already. Since the reported results can be replicated with this version of the code only, I am hesitant to change the code. I will update the README to reflect this issue. My apologies for the confusion!

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

2 participants