Oli:

before creating your optimiser and before saving -> bu


I save model(full model not the state_dict of the model) and i save the optimizer.state_dict
Then i load my model and freeze some layers and i define the optimizer again and then load the optimizers state_dict…
It throws an ugly error-
ValueError: loaded state dict contains a parameter group that doesn’t match the size of optimizer’s group
Can you pls help me get it corrected ?