AttributeError: module 'pytorch_lightning' has no attribute 'metrics'
时间: 2023-10-06 12:14:18 浏览: 340
当出现"AttributeError: module 'pytorch_lightning' has no attribute 'metrics'"报错时,意味着使用的PyTorch Lightning模块中没有metrics属性。这个错误通常是因为版本不兼容导致的。可能是你使用的PyTorch Lightning版本较旧,没有metrics属性。为了解决这个问题,你可以考虑升级到最新版本的PyTorch Lightning或者尝试使用其他方法替代metrics属性来完成你的需求。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [分级代码报错调试记录](https://blog.csdn.net/X922199/article/details/126471958)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [20天吃pytorch 3-3 高阶API 遇到问题及分析](https://blog.csdn.net/qq_44009107/article/details/123329317)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文