Full food101 dataset accuracy at 75% with effnetb2 #460
Replies: 2 comments 2 replies
-
Hi @longtongster , Good to see you're trying to improve your models! As for fine-tuning models, I'd say your next step is to try fine-tuning all the layers with code such as: for param in model.parameters():
param.requires_grad = True This means all the parameters in the target A good tip while fine-tuning is to change the learning rate to 10x smaller (because the weights are already trained on an existing dataset, you don't want to overtrain them), for example go from I'd try doing this for ~3-5 epochs and see how it goes. |
Beta Was this translation helpful? Give feedback.
-
Just an update for anyone interested ... with using 40% of the data, I am able to get to an accuracy of 84.9% on the full test set by applying just fine-tuning for 10 epochs and a linearLR learning rate schedular that starts at 1e-4. On my machine that takes quite some time (e.g 1 hour). Some images have a meal with specific ingredients then the model might predict the for example the ingredients with highest prob and not the meal (which is the label). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Was anyone able to get a higher accuracy on the full food101 dataset test set? If so can you please share your ideas? I am looking to learn tips and tricks to further improve, if possible.
I just did some straightforward training of the head of 7 epochs and then some finetuning also for 7 epochs on 30% of the training data. Looking at my loss and accuracy the test acc is still higher than train accuracy so the model has some capacity to further improvement. I see that in finetuning certain layers need to be kept frozen (batchnorm). Maybe a suggestions for @mrdbourke to include a bit more details on how exactly to do fine-tuning in the course. Going to the full dataset we have too much data just to only train the classifier so it makes sense to move towards fine-tuning.
Kind Regards
Longtongster
Beta Was this translation helpful? Give feedback.
All reactions