Resnet50 large number of classess (1000)

I am training on kaggle iNaturalist2019 dataset, which has 260k images to train on and 1010 classes. By default fastai adds fully connected layers from 4096 to 512 to 1010 features.
I am thinking if reducing number of features from 4096 to 512 and then increasing again is best solution, possibly would be better to do something like that: 4096 - > 2048 -> 1010? How can i implement this using fastai? thanks!

Looking at the source code and documentation I believe you would set lin_frts = 2048 when using cnn_learner.


Thank you @Seb. I should have checked documentation myself first :flushed:

i will check the 4096->2048->1010 and see if it gives better result…