解决_pickle.UnpicklingError: A load persistent id instruction was encountered,but no persistent_load

报错信息:_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.

报错原因:在加载模型参数时,torch版本发生变化,我报错因为训练前torch版本比较高,后面需要较低版本导致两个版本不一致发生报错。

解决办法:将训练重新训练一次就欧克了,保证训练和验证过程使用同一个版本的torch

参考链接:_pickle.UnpicklingError: A load persistent id instruction was encountered...报错信息的解决办法-CSDN博客

你可能感兴趣的:(深度学习,人工智能,机器学习)