Closed Terahezi closed 5 years ago
Hello,
How can it consume a lot of GPU memory? The example implementation in this repository does not even use GPU?
Sorry, forgot to mention that. I tried to modify your codes and send both the input and the model to gpu.
Hello,
How can it consume a lot of GPU memory? The example implementation in this repository does not even use GPU?
Hello, How can it consume a lot of GPU memory? The example implementation in this repository does not even use GPU?
Pytorch retains the graph of the gradient {edit: not all the time, but under certain circumstances}. If you are not through with scaling up one input to many inputs the retained gradients eventually blow up. I suspect you are having an issue related to this. My suggestion would be to have a look at online resources on this property of Pytorch and what .zero_grad() does.
Hi, really a great job! I was trying to get a guided-gradcam visualization of a video. But I found as more images have been read, very soon my server shows CUDA out of memory error. Then I discovered that it is because register_backward/forward_hook consumes a lot of GPU memory. Is there any way I could fix this issue? Thanks in advance!