pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: not enough values to unpack (expected 3, got 2)

Junxiang-Zeng8443 opened this issue · comments

Traceback (most recent call last):
File "D:\jupyter\pythonProject\yolov5-gradcam-master\main.py", line 124, in
main(args.img_path)
File "D:\jupyter\pythonProject\yolov5-gradcam-master\main.py", line 67, in main
saliency_method = YOLOV5GradCAM(model=model, layer_name=args.target_layer, img_size=input_size)
File "D:\jupyter\pythonProject\yolov5-gradcam-master\models\gradcam.py", line 44, in init
self.model(torch.zeros(1, 3, *img_size, device=device))
File "C:\ProgramData\Anaconda3\envs\CAM\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\jupyter\pythonProject\yolov5-gradcam-master\models\yolo_v5_object_detector.py", line 167, in forward
prediction, logits, _ = self.model(img, augment=False)
ValueError: not enough values to unpack (expected 3, got 2)