minivision-ai / photo2cartoon

人像卡通化探索项目 (photo-to-cartoon translation project)
MIT License
3.94k stars 763 forks source link

RuntimeError: CUDA out of memory. #61

Closed lanhai closed 2 years ago

lanhai commented 2 years ago

RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 8.00 GiB total capacity; 5.75 GiB already allocated; 0 bytes free; 5.97 GiB reserved in total by PyTorch)

显卡是rtx4000 8g显存,在尝试训练的时候抛出这个oom错误,请问是设置有问题还是gpu胜任不了

hao-qiang commented 2 years ago

你可以尝试减少输入大小或模型层数。