LaTeX-OCR
LaTeX-OCR copied to clipboard
CUDA error:out of memory
Thank you for sharing this project. Recently, while training my model, I encountered the "Cuda error: out of memory" issue when the training reaches halfway. I am using the default configuration file with a batch size of 64. Have you ever encountered this problem before? Can you give me some advice on how to solve this issue without reducing the batch size? (I don't want to reduce the batch size )
Hi, the reason are is that the project is working with multiple different image sizes and sequence lengths. It seems like the one of the largest combinations is too big for your memory. You can try to find the batch that breaks or just decrease the max image sizes or max sequence length in the config. https://github.com/lukas-blecher/LaTeX-OCR/blob/6fe881c5a9b7b76c21a790d0593c6e78a323406f/pix2tex/model/settings/config.yaml#L30-L32
Hi, the reason are is that the project is working with multiple different image sizes and sequence lengths.
It seems like the one of the largest combinations is too big for your memory. You can try to find the batch that breaks or just decrease the max image sizes or max sequence length in the config.
https://github.com/lukas-blecher/LaTeX-OCR/blob/6fe881c5a9b7b76c21a790d0593c6e78a323406f/pix2tex/model/settings/config.yaml#L30-L32
Thank you for your timely response. I will try it out later.