Why pytorch tensors use so much more GPU memory than Keras?
The training dataset should be no more than 300MB, but when I use Variable with requires_grad=False to load it as cuda tensor, it possesses 8GB GPU memory. While using Keras, the GPU memory usage will not go up. Keras seems to use RAM instead of GPU memory.
This issue puzzles me a lot. Single GPU has a memory at most 24G. Even if I set the training window as small as possible, training dataset use half of 24G. And when the training begins, intermediate variables use another half memory…
Does anyone find the same issue? Thank you for your help!