qq_48806867
qq_48806867
2021-01-27 00:30

yolov5 BrokenPipeError

  • python
  • 深度学习

请问使用python3.7 pytorch1.7 cuda11运行yolov5项目时,train.py与test.py出现如下错误应该如何解决?使用detect.py预训练权重则不会。

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\spawn.py", line 105, in spawn_main
Traceback (most recent call last):
  File "D:/yolo/yolov5/train.py", line 522, in <module>
    exitcode = _main(fd)
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\spawn.py", line 114, in _main
    prepare(preparation_data)
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\spawn.py", line 225, in prepare
    train(hyp, opt, device, tb_writer, wandb)
  File "D:/yolo/yolov5/train.py", line 185, in train
    _fixup_main_from_path(data['init_main_from_path'])
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
    image_weights=opt.image_weights, quad=opt.quad, prefix=colorstr('train: '))
  File "D:\yolo\yolov5\utils\datasets.py", line 83, in create_dataloader
    run_name="__mp_main__")
  File "D:\Anaconda\envs\DIP\lib\runpy.py", line 263, in run_path
    collate_fn=LoadImagesAndLabels.collate_fn4 if quad else LoadImagesAndLabels.collate_fn)
  File "D:\yolo\yolov5\utils\datasets.py", line 96, in __init__
    pkg_name=pkg_name, script_name=fname)
  File "D:\Anaconda\envs\DIP\lib\runpy.py", line 96, in _run_module_code
    self.iterator = super().__iter__()
  File "D:\Anaconda\envs\DIP\lib\site-packages\torch\utils\data\dataloader.py", line 352, in __iter__
    mod_name, mod_spec, pkg_name, script_name)
  File "D:\Anaconda\envs\DIP\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\yolo\yolov5\train.py", line 11, in <module>
    return self._get_iterator()
  File "D:\Anaconda\envs\DIP\lib\site-packages\torch\utils\data\dataloader.py", line 294, in _get_iterator
    import torch.distributed as dist
  File "D:\Anaconda\envs\DIP\lib\site-packages\torch\__init__.py", line 117, in <module>
    return _MultiProcessingDataLoaderIter(self)
  File "D:\Anaconda\envs\DIP\lib\site-packages\torch\utils\data\dataloader.py", line 801, in __init__
    raise err
OSError: [WinError 1455] 页面文件太小,无法完成操作。 Error loading "D:\Anaconda\envs\DIP\lib\site-packages\torch\lib\cudnn_cnn_infer64_8.dll" or one of its dependencies.
    w.start()
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\popen_spawn_win32.py", line 89, in __init__
    reduction.dump(process_obj, to_child)
  File "D:\Anaconda\envs\DIP\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
BrokenPipeError: [Errno 32] Broken pipe

Process finished with exit code 1
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答