AttributeError: module ‘distutils‘ has no attribute ‘version‘解决跑pytorch代码报错

AttributeError: module ‘distutils‘ has no attribute ‘version‘解决跑pytorch代码报错

跑pytorch代码报错AttributeError: module ‘distutils’ has no attribute ‘version’Traceback (most recent call last): File “D:/pycharm_envir/gaozhiyuan/Segmenta...

AttributeError: ‘model’ object has no attribute ‘copy’-pytorch

问题:加载训练模型出错解决方法:查看自己保存模型的方法,然后修改相应的加载方法1:state_dict方式保存:torch.save(model.state_dict(), 路径) # 推荐的文件后缀名是pt或pth加载:model = TheModelClass(*args, **kwargs) ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

相关镜像