Can't load weights to model, dict for model and weights are the same

I’m trying to load trained model weights and get this error message:

IncompatibleKeys(missing_keys=[], unexpected_keys=[])

I can’t figure out the issue because when I inspect model.state_dict().keys() and state_dict.keys() all of the keys are the same!

model.state_dict().keys() == state_dict.keys() produces True

What else can be preventing me from loading weights into my model?
I’ve been scanning the internet but I can’t find someone with a similar error.

Appreciate the help in advance.

This message just states, that no incompatible keys were found.
Since this message confused a lot of users, it was changed in this PR, which should make it available in the current nightly build.

1 Like

lmao damn, thought it was an error.


1 Like