赞
踩
- [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda3\envs\py38torch_gpu\lib\site-packages\torch\lib\caffe2_module_test_dynamic.dll" or one of its dependencies.
- 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.
- Traceback (most recent call last):
- File "<string>", line 1, in <module>
- File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 116, in spawn_main
- exitcode = _main(fd, parent_sentinel)
- File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 125, in _main
- prepare(preparation_data)
- File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 236, in prepare
- _fixup_main_from_path(data['init_main_from_path'])
- File "D:\Anaconda3\envs\py38torch_gpu\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
- main_content = runpy.run_path(main_path,
- File "D:\Anaconda3\envs\py38torch_gpu\lib\runpy.py", line 265, in run_path
- return _run_module_code(code, init_globals, run_name,
- File "D:\Anaconda3\envs\py38torch_gpu\lib\runpy.py", line 97, in _run_module_code
- _run_code(code, mod_globals, init_globals,
- File "D:\Anaconda3\envs\py38torch_gpu\lib\runpy.py", line 87, in _run_code
- exec(code, run_globals)
- File "E:\Python project\yolov5\YOLOV5-6.1\train.py", line 27, in <module>
- import torch
- File "D:\Anaconda3\envs\py38torch_gpu\lib\site-packages\torch\__init__.py", line 124, in <module>
- 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
三、重设虚拟内存
基本上我的调试进行到这里就没有上面的报错了!!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。