To explain the datasets I’m dealing with, I’ll use these terminologies :
A : The bigger dataset. Contains various classes c1, c2, c3 …c7. Contains one other class called c~. This dataset can be seen as binary class dataset with c1,c2…c7 in one entire class and c~ in the other class.
B. Contains data (c3) which is very similar in appearance to A. I want to make a model which can be a binary class detector between c3 and c~.
ResNet has given the best results yet. Therefore I’m looking to train the entire ResNet on dataset A since A is much bigger than B. And finally use transfer learning to finetune the last layers for dataset B.
Most of the content I can find in forums is related to using a model trained on ImageNet, and using transfer-learning for your own dataset on that pre-trained model.
What I’m trying to do is train the entire ResNet50 on A. FineTune on B. If you can please guide me for this, I would be really thankful.
If you want to train only the fc layer, you can use learn.freeze() before using learn.fit() to train on the new data. If you want to train all layers (aka finetuning), just use learn.fit().
As for Charm’s question, I believe learn.set_data() takes care of changing the final fc layer behind the scenes.