I trained a model and saved the state_dict that I am trying to load again. However, I am getting a “missing keys in state_dict” while loading the model again, even though it has the exact same architecture.
The “missing keys” and “unexpected keys” are also very strange. It looks like the only difference between missing keys and unexpected keys is that the missing keys have an extra ‘0’ in them, as follows:
missing key: “feature_extractor_trainable.0.0.conv1.weight”
unexpected key: “feature_extractor_trainable.0.conv1.weight”
All missing keys have the same issue: there is an extra 0 in the parameter name.
Any idea of what might be causing this?
Thanks.