Hi,
I have an image classification problem that I have implemented in PyTorch. The code works perfectly when I have a batch size of 10. Any more than that, I get ‘CUDA out of memory’ error.
The images are 4-channeled and I use a DenseNet architecture. However, when I use only 1 channel (of the 4) for training (with a DenseNet that takes 1 channel images), I expected I could go up to a batch size of 40. But unfortunately, I get the out of memory error for any batch size above 10.
Can anyone please explain the logic behind this? I’m confused at this point, any inputs would be greatly appreciated.
Many thanks in advance!