nupurkmr9 / S2M2_fewshot

Other
112 stars 20 forks source link

Error when loading the pre-trained models #26

Closed OverVan closed 2 years ago

OverVan commented 2 years ago

Hello, when I load the pre-trained models on tieredImageNet Some error occurred. Details are as follows:

  File "/opt/tljh/user/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1468, in load_state_dict
    load(self)
  File "/opt/tljh/user/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1466, in load
    load(child, prefix + name + '.')
  File "/opt/tljh/user/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1462, in load
    module._load_from_state_dict(
  File "/opt/tljh/user/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1390, in _load_from_state_dict
    if not is_param_lazy and input_param.shape != param.shape:
AttributeError: 'NoneType' object has no attribute 'shape'

Hope for your solution...