在 model 后面加个 .module,再次运行,加载模型成功。
参考来自:pytorch——AttributeError: ‘DataParallel’ object has no attribute ‘****’
MedSegDiff加载checkpoint文件(.pt)报错AttributeError: ‘DataParallel‘ object has no attribute ‘****‘
最新推荐文章于 2024-05-20 22:54:06 发布
在 model 后面加个 .module,再次运行,加载模型成功。
参考来自:pytorch——AttributeError: ‘DataParallel’ object has no attribute ‘****’