Hi everyone 
I have a pretrained model that I trained on ImageNet data. I stored the model.state_dict() and the optimizer.state_dict() in a checkpoint file.
Now I would like to train a model on VGGFace2 data with the pretrained weights of the model trained on ImageNet to speed up training. This means that I have to change some of the layers in my model. I have seen that I can add the strict=False flag when I load the model.state_dict() to only add the weights to the layers that are present in both the old and the new model. But there is no such option for the optimizer.state_dict().
How can I resume training with both the model.state_dict() and optimizer.state_dict() on another model than they were trained on?
Any help is very much appreciated!
All the best,
snowe