joaoantoniocn / AM-MobileNet1D

The Additive Margin MobileNet1D is a new light weight deep learning model for Speaker Recognition which is based on the MobileNetV2 architecture and the Additive Margin Softmax (AM-Softmax) loss function.)
29 stars 10 forks source link

How to quickly train the model based on the original model for the audio data of the new speaker? #2

Open joewale opened 4 years ago

joewale commented 4 years ago

How to quickly train the model based on the original model for the audio data of the new speaker?

joaoantoniocn commented 4 years ago

I would advise to retrain the entire dataset again

joewale commented 4 years ago

the efficiency of training would be lower, and can't do online training

joaoantoniocn commented 4 years ago

You can also try to do transfer learning with the model, there are some tutorial of how to do it for computer vision models, you will have to adapt it to your situation. In the case of AM-MobileNed1D you would have to retrain only the model classifier, but I haven't tried it yet.

model.classifier = nn.Sequential( nn.Dropout(0.2), nn.Linear(self.last_channel, num_classes[0]), nn.LogSoftmax(dim=1), )

So, you will have to change the 'num_classes[0]' to your new number of classes.

joewale commented 4 years ago

got it,I should have a try. thanks