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

Computing teacher outpouts is called only onece? #23

Open
ssqfs opened this issue Dec 25, 2019 · 1 comment
Open

Computing teacher outpouts is called only onece? #23

ssqfs opened this issue Dec 25, 2019 · 1 comment

Comments

@ssqfs
Copy link

ssqfs commented Dec 25, 2019

Teacher model's outputs are only computed before training epoch. https://github.com/peterliht/knowledge-distillation-pytorch/blob/master/train.py#L277

It assumes that inputs are fixed in each epoch. But the inputs are different in each epoch due to the random transform operations, e.g. randonCrop, randomFlip.
I think the right way is to recalculate teacher's outputs in each epoch.
Is it a bug?

@qinjian623
Copy link

I think so.
Especially, you set shuffle dataset to True.
In this case, every epoch is different, even if you do not use data augmentation.

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