pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam
MIT License
281 stars 47 forks source link

RuntimeError: The size of tensor a (80) must match the size of tensor b (1280) at non-singleton dimension 1 #35

Open ugroznc opened 9 months ago

ugroznc commented 9 months ago

Hi all,

When I run main main.py with my yolov5X model pretrained with ultralytics v5_6.1 on custom images I got this error message.

saliency_map = (weights * activations).sum(1, keepdim=True) RuntimeError: The size of tensor a (80) must match the size of tensor b (1280) at non-singleton dimension 1

Is there any solution for this?

Best regards.

tejasri19 commented 7 months ago

@ugroznc did u find solution to this error?

NusratTahira commented 1 month ago

@ugroznc Hi, Did you solve it?