# Regarding add extra class in fine-tune model

**URL:** <https://discuss.huggingface.co/t/regarding-add-extra-class-in-fine-tune-model/15425>\
**Category:** Intermediate\
**Created:** [March 7, 2022, 7:38am UTC](https://discuss.huggingface.co/t/regarding-add-extra-class-in-fine-tune-model/15425 "2022-03-07T07:38:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chintanshrinath](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@chintanshrinath](https://discuss.huggingface.co/u/chintanshrinath)\
**Post date:** [March 7, 2022, 7:38am UTC](https://discuss.huggingface.co/t/regarding-add-extra-class-in-fine-tune-model/15425/1 "2022-03-07T07:38:59Z")

</div>

Hello Everyone  
I have trained Bert model for classification task for 31 classes.  
Now, I want to add one or two extra classes in fine-tune model.  
Idea is that, I don’t want to fine-tune entire model, but I can load previous fine-tune model and add only extra data(class)

I tried but it is showing an error as mismatch size, offcourse, that will happend because earlier I have fine-tune the model for 31 classes

So how I can add extra class? something I have to remove last layer or else

Can anyone help in this context?

thanks
