Error loading weights; "11.weight"

I try to load the .h5 of a pretrained model like this:
learn.load('name_of_h5')

Any idea for this?



File “/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 522, in load_state_dict
.format(name))

KeyError: ‘unexpected key “11.weight” in state_dict’

The error was caused by mixing different clones of FastAI. It was solved by using explicitly the same clone for training, saving/loading weights and testing purposes.