其他分享
首页 > 其他分享> > *** RuntimeError: CUDA error: out of memory.

*** 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")    

标签:显存,RuntimeError,error,指定,CUDA,memory,device,might,out
来源: https://www.cnblogs.com/leifzhang/p/15269683.html