ImportError: cannot import name 'PatchEmbed' from 'timm.models.layers' (d:\python37\lib\site-packages\timm\models\layers\__init__.py)
时间: 2023-09-14 09:08:51 浏览: 662
这个错误是由于在导入'timm.models.layers'模块中的'PatchEmbed'时出现了问题。引用中提到了解决这个错误的方法。你可以通过从timm库的源码地址https://github.com/rwightman/pytorch-image-models克隆整个库的代码,然后将timm文件夹复制到AppData\Roaming\Python\Python37\site-packages\timm-0.1.20-py3.7.egg下来解决这个问题。这样做应该可以修复导入错误。希望这可以帮助你解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Window10下的SlowFast安装、测试](https://blog.csdn.net/qq_28597273/article/details/125662942)[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: 50%"]
- *2* *3* [ImportError: cannot import name ‘container_abcs‘ from ‘torch._six](https://blog.csdn.net/weixin_42748439/article/details/124155108)[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: 50%"]
[ .reference_list ]
阅读全文