Reputation: 145
I am trying to train YOLOv3 using this repository with custom dataset
https://github.com/ultralytics/yolov3
I used the weight that recommended in the readme yolov3-spp-ultralytics.pt
When I train I get the following error:
Traceback (most recent call last):
File "yolov3/train.py", line 431, in <module>
train(hyp) # train normally
File "yolov3/train.py", line 119, in train
ckpt = torch.load(weights, map_location=device)
File "/opt/conda/lib/python3.7/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/opt/conda/lib/python3.7/site-packages/torch/serialization.py", line 763, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
Any idea how Yolov3 pickles the file?
Upvotes: 6
Views: 13084
Reputation: 297
I think your yolov3-spp-ultralytics.pt is not correct. Please open it with notepad, I guess the content is a 404 HTML page. The "<" is the beginning of a HTML page.
Upvotes: 5