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

Mode Collapse on Custom Dataset #7

Open
hayatrajani opened this issue Sep 15, 2021 · 2 comments
Open

Mode Collapse on Custom Dataset #7

hayatrajani opened this issue Sep 15, 2021 · 2 comments

Comments

@hayatrajani
Copy link

Hi! First of all kudos on the great work!

So, I am experimenting on a custom dataset of about 70k images consisting of 7 different classes. However, the model seems to collapse after 3-4 epochs of training. I have tried playing around with different embedding dimensions for the out_dim parameter and lower values for teacher_temp to increase sharpening, but in vain.

Have you experimented with smaller datasets? Would you be able to provide any suggestions in this case?

Thanks!

@ChunyuanLI
Copy link
Contributor

ChunyuanLI commented Sep 15, 2021

Thanks for trying out the codebase. I have not tried to complete pre-training and evaluate the performance for a smaller dataset, though I usually use the dataset of a similar size (eg ImageWoof) for debugging in a local machine.

Could you please post the your hyper-parameter, dataset settings, and training logs here (eg, what is the behavior of "the model seems to collapse after 3-4 epochs of training")? so that we can access the details and start the discussion.

@hayatrajani
Copy link
Author

Thank you for getting back to me on this.

Here are my training logs. In the logs you can also find the entropy (H) and KL divergence for each epoch, both with and without centering and/or sharpening, to look for collapse as suggested by the authors of DINO in their paper. Further, I also tried logging the cosine similarity of output embedings to see if the model collapses to the same representation regardless of the input.

I use all the default settings except out_dim and teacher_temp, which, for this log, were set to 4096 and 0.03 respectively.

I will also try training the model on another similar sized dataset and see if I can debug it.

Thanks for the support!

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