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

DKD: the nckd loss becomes infinity after one iteration of training. #60

Open
OuYangg opened this issue Jan 30, 2024 · 2 comments
Open

Comments

@OuYangg
Copy link

OuYangg commented Jan 30, 2024

First of all, thank the author for open source. DKD is a very good job!

I trained a binary classification model and wanted to use DKD for distillation, but after one iteration of training, the output of the student model became very strange, causing the loss to become Inf.

Some details:
iteration 1:
image
image
iteration 2:
image

@OuYangg
Copy link
Author

OuYangg commented Jan 30, 2024

After I adjusted the learning rate down, the loss is no longer nan, but the nckd loss is still 0.
image

@Zzzzz1
Copy link
Collaborator

Zzzzz1 commented Feb 19, 2024

NCKD loss can not be applied on binary classification tasks, since there is no "non-target class". The non-target logits will be always 1.0, may introduce some problems when calculating KLD.

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