Traceback (most recent call last):

什么是Traceback (most recent call last):

在yolov5这个项目进行测试的时候报错
第一次接触根本不懂,啥也不懂
Traceback (most recent call last):_第1张图片

res=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs\detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
YOLOv5  v6.1-32-gc13d4ce torch 1.10.2 CPU

Traceback (most recent call last):
  File "detect.py", line 252, in 
    main(opt)
  File "detect.py", line 247, in main
    run(**vars(opt))
  File "D:\Anaconda3\envs\pytorch1.7\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context
    return func(*args, **kwargs)
  File "detect.py", line 92, in run
    model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half)
  File "F:\yolov5-5.0-mask\models\common.py", line 306, in __init__
    model = attempt_load(weights if isinstance(weights, list) else w, map_location=device)
  File "F:\yolov5-5.0-mask\models\experimental.py", line 97, in attempt_load
    ckpt = (ckpt['ema'] or ckpt['model']).float()  # FP32 model
KeyError: 'ema'

感觉前面是大致的介绍基本信息,到了后面,于是百度了第一行
发现就是报错了,每一个File都表明了错误出现的文件的具体位置与具体信息,
其中对这个opt
是参数的意思
看了这个文章
https://blog.csdn.net/HOLEYU/article/details/121273940
他也有我第一行的报错,但是他都是解决的最后一行的错误

你可能感兴趣的:(人工智能,人工智能)