pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using CUDA, crashes script.

anantsakhare opened this issue · comments

commented

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

@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.