Error loading "D:\Users\ASUS\anaconda3\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.
时间: 2023-08-30 17:10:07 浏览: 183
python 3.74 运行import numpy as np 报错lib\site-packages\numpy\__init__.py
报错信息:"Error loading "D:\Users\ASUS\anaconda3\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies." 可能是由于页面文件太小导致的。
解决这个问题的一个方法是打开train.py文件,将442行的参数"default"改为'cpu',即将default=' '修改为default='cpu'。这样可以将设备设置为CPU而不是GPU。
另外一个解决方法是将train.py文件中的442行的batch_size参数改为1,并将459行的num_workers参数改为0,即将batch_size改为1,将num_workers改为0。这样可以减少数据加载的并行度。
通过以上两种方法的尝试,你可能能够解决报错信息中涉及的文件加载问题。希望能对你有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [pytorch遇到Error loading “C:\Anaconda3\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll](https://blog.csdn.net/hjxu2016/article/details/118890108)[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* [Yolov5报错Error loading “D:\...\GPU\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll”](https://blog.csdn.net/mateuszusd/article/details/129944704)[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 ]
阅读全文