Add extra class after fine-tune the model

I have fine tune the bert model with 38 classes, Now I want to add one extra class.
Do I need to fine-tune the entire model or just load checkpoint, and I can add one extra class,
Can you help me in this context?


Hi @chintanshrinath, since the last layer has 38 neurons/outputs so you will have to replace that with 39 neurons (38 + 1 extra c;ass). This will cause the last layer or the prediction layer to reinitialize and you will have to finetune it. You can freeze the rest of the layers and just train the newly replaced layer.

Also, we have migrated from this Forum to Github Discussion. I would request you to ask your questions there for quicker response. :slight_smile: