Hi @smth , I tried all the discussion and everywhere but can’t find the correct solution with pytorch. I am seeking your help.
How can I free up the memory of my GPU ?
[time 1] used_gpu_memory = 10 MB
[time 2] model = ResNet(Bottleneck, [3, 3, 3, 3],100).cuda()
[time 2] used_gpu_memory = 889 MB
[time 3] del model
[time 4] torch.cuda.empty_cache()
[time 4]  used_gpu_memory = 627 MB
I tried gc.collect(). It is also not helping. I am having huge problem during training due to this un-referenced memories.