非常感谢大佬的注释和详解,我在运行训练的时候报错,请问有解决方法么?
Traceback (most recent call last):
File "train.py", line 931, in
main(opt)
File "train.py", line 796, in main
train(opt.hyp, opt, device)
File "train.py", line 122, in train
run_id = torch.load(weights).get('wandb_id') if weights.endswith('.pt') and os.path.isfile(weights) else None
File "/home/ai/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 607, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/home/ai/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 882, in _load
result = unpickler.load()
File "/home/ai/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 875, in find_class
return super().find_class(mod_name, name)
AttributeError: Can't get attribute 'SPPF' on <module 'models.common' from '/home/ai/sda/MyCode/yolov5_annotations-master/models/common.py'>
非常感谢大佬的注释和详解,我在运行训练的时候报错,请问有解决方法么? Traceback (most recent call last): File "train.py", line 931, in
main(opt)
File "train.py", line 796, in main
train(opt.hyp, opt, device)
File "train.py", line 122, in train
run_id = torch.load(weights).get('wandb_id') if weights.endswith('.pt') and os.path.isfile(weights) else None
File "/home/ai/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 607, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/home/ai/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 882, in _load
result = unpickler.load()
File "/home/ai/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 875, in find_class
return super().find_class(mod_name, name)
AttributeError: Can't get attribute 'SPPF' on <module 'models.common' from '/home/ai/sda/MyCode/yolov5_annotations-master/models/common.py'>