yolov5 EOFError: Ran out of input

如果是训练中遇到这种问题先把训练数据集中的 labels.cache 文件删除, 再去尝试训练。因为 labels.cache可能是训练历史文件,删除重新训练会自动生成,不删除可能因为错误数据导致加载不了数据集

Traceback (most recent call last):
  File "D:/JaskProbject/Recaptcha/yolov5_word/train.py", line 664, in <module>
    main(opt)
  File "D:/JaskProbject/Recaptcha/yolov5_word/train.py", line 562, in main
    train(opt.hyp, opt, device)
  File "D:/JaskProbject/Recaptcha/yolov5_word/train.py", line 227, in train
    dataloader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, single_cls,
  File "D:\JaskProbject\Recaptcha\yolov5_word\utils\datasets.py", line 96, in create_dataloader
    dataset = LoadImagesAndLabels(path, imgsz, batch_size,
  File "D:\JaskProbject\Recaptcha\yolov5_word\utils\datasets.py", line 402, in __init__
    cache, exists = torch.load(cache_path), True  # load
  File "C:\ProgramData\Anaconda3\envs\reCaptcha\lib\site-packages\torch\serialization.py", line 608, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\ProgramData\Anaconda3\envs\reCaptcha\lib\site-packages\torch\serialization.py", line 777, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

你可能感兴趣的:(python,机器翻译,人工智能)