RuntimeError: CUDA error: out of memory

RuntimeError: CUDA error: out of memory

这种错误一般分两种情况: 1)第一种情况是你的显卡的显存确实不够,解决方法就是改动 batchsize这些超参数试试(把batchsiz改小),或者买显存更大的显卡; 2)第二种情况是显卡的性能能满足, 但是被其他程序占用,需要把相应的进程kill掉。

我的这种错误好像是因为cuda不够用,显存不够,需要换用显存更大的显卡。。。换用显存更大的显卡,问题就解决了。 

已解决:RuntimeError: CUDA error: out of memory_小天冲冲冲的博客-CSDN博客

RuntimeError: CUDA out of memory(已解决)_雷恩Layne的博客-CSDN博客

RuntimeError: CUDA error: out of memory的解决【实测成功】_captain飞虎大队的博客-CSDN博客

全网最全RuntimeError: CUDA error: out of memory解决方法_只会git clone的程序员的博客-CSDN博客 pytorch: 四种方法解决RuntimeError: CUDA out of memory. Tried to allocate ... MiB_xiyou__的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/weixin_39450145/article/details/125630762