How to resolve “RuntimeError: CUDA out of memory”?
In loading a pre-trained model or fine-tuning an existing model, an “CUDA out of memory” error like the following often prompts:
RuntimeError: CUDA out of memory. Tried to allocate 576.00 MiB
(GPU 0; 39.42 GiB total…