File "train.py", line 226, in 
main()
File "train.py", line 94, in main
train_phase(model, optimizer, scheduler, epoch, data_loaders, data_size)
File "train.py", line 138, in train_phase
anc_embed, pos_embed, neg_embed = model(anc_img), model(pos_img), model(neg_img)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in  **call**
result = self.forward(*input, **kwargs)
File "/home/kelvinheng/proj1_code/models.py", line 37, in forward
embed = self.resnet50(images)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in  **call**
result = self.forward(*input, **kwargs)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torchvision/models/resnet.py", line 157, in forward
x = self.layer3(x)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in  **call**
result = self.forward(*input, **kwargs)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in  **call**
result = self.forward(*input, **kwargs)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torchvision/models/resnet.py", line 84, in forward
out = self.bn2(out)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in  **call**
result = self.forward(*input, **kwargs)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py", line 76, in forward
exponential_average_factor, self.eps)
File "/home/kelvinheng/anaconda3/envs/proj1/lib/python3.7/site-packages/torch/nn/functional.py", line 1623, in batch_norm
training, momentum, eps, torch.backends.cudnn.enabled
RuntimeError: CUDA out of memory. Tried to allocate 5.75 MiB (GPU 0; 10.73 GiB total capacity; 9.64 GiB already allocated; 3.25 MiB free; 121.92 MiB cached)

The above is my error. The training runs for 60 epochs before CUDA runs out of memory. Not sure whether it is due to batchnorm. If i decrease my batch size, i can run for a few more epochs before CUDA is out of memory. Can anyone help?
I am using RTX 2080TI and pytorch 1.0, python 3.7, CUDA 10.0. It is just a basic resnet50 from torchvision.models and i change the last fc layer to output 256 embeddings and train with triplet loss.
Thanks