_IncompatibleKeys(missing_keys=['features.0.weight', 'features.0.bias', 'features.2.weight', 'features.2.bias', 'features.5.weight', 'features.5.bias', 'features.7.weight', 'features.7.bias', 'features.10.weight', 'features.10.bias', 'features.12.weight', 'features.12.bias', 'features.14.weight', 'features.14.bias', 'features.18.weight', 'features.18.bias', 'features.20.weight', 'features.20.bias', 'features.22.weight', 'features.22.bias', 'features.26.weight', 'features.26.bias', 'features.28.weight', 'features.28.bias', 'features.30.weight', 'features.30.bias', 'conv6.weight', 'conv6.bias', 'conv7.weight', 'conv7.bias', 'conv8.weight', 'conv8.bias', 'conv9.weight', 'conv9.bias'], unexpected_keys=['architecture', 'epoch', 'state_dict', 'optimizer'])
Getting the above output on model5.load_state_dict(torch.load(path), strict=False). I want to know is my model loaded correctly? I want to use the loaded model to predict some images. I don’t have the [‘architecture’, ‘epoch’, ‘state_dict’, ‘optimizer’] on which the model was trained. Is it possible to load the model without these unexpected_keys=[‘architecture’, ‘epoch’, ‘state_dict’, ‘optimizer’])? If not, how do I pass these values to model5.load_state_dict(torch.load(path), strict=False)