当前位置:   article > 正文

YOLOV5-6.1报错:OSError: [WinError 1455] 页面文件太小,无法完成操作。_yolo页面文件太小

yolo页面文件太小
  1. [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda3\envs\py38torch_gpu\lib\site-packages\torch\lib\caffe2_module_test_dynamic.dll" or one of its dependencies.
  2. OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda3\envs\py38torch_gpu\lib\site-packages\torch\lib\caffe2_module_test_dynamic.dll" or one of its dependencies.
  3. Traceback (most recent call last):
  4. File "<string>", line 1, in <module>
  5. File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 116, in spawn_main
  6. exitcode = _main(fd, parent_sentinel)
  7. File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 125, in _main
  8. prepare(preparation_data)
  9. File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 236, in prepare
  10. _fixup_main_from_path(data['init_main_from_path'])
  11. File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
  12. main_content = runpy.run_path(main_path,
  13. File "D:\Anaconda3\envs\py38torch_gpu\lib\runpy.py", line 265, in run_path
  14. return _run_module_code(code, init_globals, run_name,
  15. File "D:\Anaconda3\envs\py38torch_gpu\lib\runpy.py", line 97, in _run_module_code
  16. _run_code(code, mod_globals, init_globals,
  17. File "D:\Anaconda3\envs\py38torch_gpu\lib\runpy.py", line 87, in _run_code
  18. exec(code, run_globals)
  19. File "E:\Python project\yolov5\YOLOV5-6.1\train.py", line 27, in <module>
  20. import torch
  21. File "D:\Anaconda3\envs\py38torch_gpu\lib\site-packages\torch\__init__.py", line 124, in <module>
  22. raise err

一、修改train.py文件中--workers的默认参数,设置为0

parser.add_argument('--workers', type=int, default=0, help='max dataloader workers (per RANK in DDP mode)')

二、将general.py文件中NUM_THREAD设置为1

 # NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) # number of YOLOv5 multiprocessing threads

NUM_THREADS = 1

三、重设虚拟内存

基本上我的调试进行到这里就没有上面的报错了!!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/669503
推荐阅读
相关标签
  

闽ICP备14008679号