*** RuntimeError: CUDA error: out of memory.


CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

 

這個error 的原因是,當期指定的GPU的顯存不足,可以關閉現有的process,或者重指定顯卡編號。

device = torch.device("cuda:0")
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM