ImportError: cannot import name 'rank_zero_only' from 'torchmetrics' (D:\anaconda3\soft\envs\ldm\lib\site-packages\torchmetrics\__init__.py)
时间: 2023-09-16 14:12:25 浏览: 140
根据提供的引用内容,ImportError: cannot import name 'rank_zero_only' from 'torchmetrics' (D:\anaconda3\soft\envs\ldm\lib\site-packages\torchmetrics\__init__.py) 意味着在导入'torchmetrics'模块时发生了错误。此错误可能是由于该模块中缺少名为'rank_zero_only'的属性引起的。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [Traceback (most recent call last): File “C:\ProgramData\Anaconda3\lib\site-packages\qtpy\Qt...](https://blog.csdn.net/weixin_45048331/article/details/116012045)[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_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文