phlippe / uvadlc_notebooks

Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2023
https://uvadlc-notebooks.readthedocs.io/en/latest/
MIT License
2.59k stars 589 forks source link

About the same amount of images in every class #109

Closed rakibMahmud closed 1 year ago

rakibMahmud commented 1 year ago

I am doing this few shot learning for cub200 dataset. To do this thing do i need to have same amount of images in every class? Because in this dataset, the amount of images are not same in every class. (tutorial 12)

phlippe commented 1 year ago

Hi, I assume you are referring to Meta-Learning (tutorial 16) and not Autoregressive Image Generation (tutorial 12), right? For meta-learning, you don't need to have the same number of images for each class. I would only recommend to sample an equal number of images per class in a batch, so that each batch itself is balanced. During training, you therefore upsample the classes with fewer images