1问题描述
具体描述如下图所示:
Transferred 39/440 items from yolov5s.pt
Scaled weight_decay = 0.0005
Optimizer groups: 75 .bias, 75 conv.weight, 72 other
Traceback (most recent call last):
File "train.py", line 541, in
train(hyp, opt, device, tb_writer)
File "train.py", line 192, in train
image_weights=opt.image_weights, quad=opt.quad, prefix=colorstr('train: '))
File "/home/zzk/project/yolov3-master/utils/datasets.py", line 76, in create_dataloader
prefix=prefix)
File "/home/zzk/project/yolov3-master/utils/datasets.py", line 389, in __init__
cache, exists = torch.load(cache_path), True # load
File "/root/anaconda3/envs/pytorch19/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 "/root/anaconda3/envs/pytorch19/lib/python3.7/site-packages/torch/serialization.py", line 762, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: STACK_GLOBAL requires str
2具体原因:未知
3解决办法:
数据集labels文件中产生了.cache文件,需要先把这个文件删掉。(就是下图中的labels.cache文件)