pooya-mohammadi / yolov5-gradcam

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

using CUDA, crashes script. #27

Closed anantsakhare closed 2 years ago

anantsakhare commented 2 years ago

After using the Cuda as a device, it consumes GPU memory, there is a memory leak.

causes due to score.backward(retain_graph=True) @pooya-mohammadi

ssbin0914 commented 1 year ago

@anantsakhare Can you please tell me how you solved the memory leak problem? I get 'Cuda out of memory' error when I run grad-cam on bunch of images using CUDA.