Tianyi_Zhou:

CUDA error: Out of Memory


(common cause) I think your model allocate the Max GPU memory, you’ll need to reduce batch size.
btw, could you please tell me what model did you train and batch size?
else follow this link
Frequently Asked Questions — PyTorch 1.7.0 documentation 1.