RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory
Asked Answered
N

0

8

I am following this tutorial: https://blog.paperspace.com/train-yolov5-custom-data/ in order to train a custom dataset. I followed exactly the steps it says inside this tutorial. But when I try this command: python3 train.py --img 640 --cfg yolov5s.yaml --hyp hyp.scratch.yaml --batch 32 --epochs 100 --data road_sign_data.yaml --weights yolov5s.pt --workers 24 --name yolo_road_det I get this error:

  File "/home/UbuntuUser/.local/lib/python3.8/site-packages/torch/serialization.py", line 242, in __init__
    super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory

I have searched in google, and I found similar threads like this: https://discuss.pytorch.org/t/error-on-torch-load-pytorchstreamreader-failed/95103 and this: last.ckpt | RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: failed finding central directory but I couldn't find a solution! The problem is here:

class _open_zipfile_reader(_opener):
    def __init__(self, name_or_buffer) -> None:
        super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))

I followed the steps of the above tutorial, I don't know how to fix it...Could you help me?

Nemertean answered 6/1, 2022 at 8:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.