Saving state_dict() 54.
Loading the model.  56
Model is defined by model.prepare_model() 22

This can be reproduced by https://github.com/muammar/mlchem/tree/master/examples 36.
I assume the problem at inference time is that I instantiate the neural network class and those unexpected keys are not there. If I remove the  conditional statement here 7 I don’t get the error but inferences are wrong and the custom parameters are not the ones I optimized.