在训练完成准备运行推理的时候,出项这个报错,孩子实在找不出原因了
Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.25, device='', exist_ok=False, img_size=640, iou_thres=0.45, name='exp', nosave=False, project='runs/detect', save_conf=False, save_txt=False, source='0', update=False, view_img=True, weights='weights/best.pt')
YOLOv5 2021-4-12 torch 1.11.0 CUDA:0 (NVIDIA GeForce GTX 1660 Ti, 6143.6875MB)
Fusing layers...
Model Summary: 224 layers, 7056607 parameters, 0 gradients
1/1: 0... success (640x480 at 0.00 FPS).
Traceback (most recent call last):
File "D:/yolov5-hat/detect.py", line 178, in
detect()
File "D:/yolov5-hat/detect.py", line 61, in detect
model(torch.zeros(1, 3, imgsz, imgsz).to(device).type_as(next(model.parameters()))) # run once
File "E:\code\ana\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)