Hi - I’m working on a convolutional autoencoder model. The model has two conv layers, one linear bottleneck layer, two deconv layers. I’m also using max pooling and max unpooling layers in encoder and decoder correspondingly. I’m working on MNIST with mini batch size 512. My model errored out after 10 epochs due to memory issue.
“RuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 15.78 GiB total capacity; 11.70 GiB already allocated; 2.50 MiB free; 412.06 MiB cached)”.
Then I tried to run with smaller mini batch size but I keep getting the error.   I’m using Torch’s data loader tool . Does PyTorch load the full training set on GPU and then run training on mini batches? Is it possible to load only a mini batch at a time and process? I know that it’ll be slow. I also noticed that I get this issue if I use the max unpooling operation. It requires the max-pooled indices from the forward pass which requires additional memory.
Regards,
Tomojit