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

Why is every term of the loss function reduced by 2 in the proposed method? #1

Open
aki916 opened this issue Jun 12, 2024 · 0 comments

Comments

@aki916
Copy link

aki916 commented Jun 12, 2024

iMTSP/my_train.py

Lines 40 to 42 in c17ff89

loss = torch.mul(torch.tensor(cost, device=device) - 2, log_prob.sum(dim=1)).sum() \
- torch.mul(cost_s.detach() - 2, log_prob.sum(dim=1)).sum() \
+ (cost_s - 2).sum()

Would it be possible to tell me the reason why every term of the loss function is reduced by 2 in the proposed method?
Thanks in advance.

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