New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fine tuning ... #24
Comments
Thank you but that one is a classification task but yours is a semantic segmentation. |
I am not the author and I dont know the accuracy. |
I think this layer should be truncated and fine-tuned with a different number of classes:
otherwise the rest of the code uses the pre-trained weights to train on a new dataset, but with 21 classes. |
Also this layer inside context:
This makes it tricky for me, but the author certainty can do or give some tips. |
Correct, first the number of features in those two layers to 2. Then, follow the keras blog to load the pretrained weights for all the other layers. If you want, you can freeze those layers, and then you can start training |
Actually you load the pre-trained model already in the code, as I see. Am I right? Therefore I should pop or delete these two layers and add new ones OR freeze the weights just before these layers to be trained with the new class parameter. In case of freezing, may I ask you I should freeze till what layer number? Because these are two different layers in two different locations I'm little bit confused and I need your help. what I know is classification models which we only deal with one layer and examples are all about this, not like the situation we have here |
Start by changing the model definitions to reduce the output dimension to 2 (the number of classes you want). This function will then error out: change it so that you don't load the weights for the last layer. You're now ready to train on your dataset. You may want to look into freezing the weights for the existing layers, but it may not be required. |
Hello,
You have provided the pre-trained model of VOC. I have a small dataset with 2 classes, which I annotated based on VOC and I want to fine-tune it. Would you please guide me through the process?
The text was updated successfully, but these errors were encountered: