Hi! I have read this post: CUDA memory leakage 1.
In the discussion, I find that this makes great sense to me:
Often memory leaks are created by trying to store some training information like the loss without detaching it from the computation graph, which will store the whole graph with it.
However, I don’t understand why the memory usage remains the same when I just add all the outputs into a variable (no detach operation). I think I am still storing the training information, right?
Thank you!