I am asking this question because I am successfully training a segmentation network on my GTX 2070 on laptop with 8GB VRAM and I use exactly the same code and exactly the same software libraries installed on my desktop PC with a GTX 1080TI and it still throws out of memory.
Why does this happen, considering that:
The same Windows 10 + CUDA 10.1 + CUDNN 7.6.5.32 + Nvidia Driver 418.96 (comes along with CUDA 10.1) are both on laptop and on PC.
The fact that training with TensorFlow 2.3 runs smoothly on the GPU on my PC, yet it fails allocating memory for training only with PyTorch.
PyTorch recognises the GPU (prints GTX 1080 TI) via the command :
print(torch.cuda.get_device_name(0))
PyTorch allocates memory when running this command:
torch.rand(20000, 20000).cuda()
#allocated 1.5GB of VRAM.
What is the solution to this?
augmentation=None
) still causes the problem? Other than that, everything seems to be ok. I'll give it a try later. – Berriel