- Pytorch加载模型报错:
deserialized_storage_keys = pickle_module.load(f)
AttributeError: Can’t get attribute ‘_rebuild_parameter’ on <module ‘torch._utils’ from ‘/opt/conda/lib/python3.6/site-packages/torch/_utils.py’> - 原因:你要加载的模型是高版本保存的,而你用低版本加载就会出错
- 解决方法:升级Pytorch版本
参考:https://discuss.pytorch.org/t/cant-get-attribute-rebuild-parameter-on-module-torch-utils/32603