Solved by ptrblck in post #14 
              
              
                Thanks for the update to the code. 
I cannot reproduce the issue on an A6000 and the script runs fine for a few epochs: 
root@dc9def623dde:/workspace/src/OOM-occurs-while-I-have-enough-cuda-memory# python run2.py 
Namespace(base_path='/data/guest1/clothing1m/', batch_size=64, cuda_device=0, img_size…