How to fix this strange error: “RuntimeError: CUDA error: out of memory”

后端 未结 6 675
时光取名叫无心
时光取名叫无心 2021-02-12 22:59

I ran a code about the deep learning network,first I trained the network,and it works well,but this error occurs when running to the validate network.

I have five epoch,

6条回答
  •  死守一世寂寞
    2021-02-12 23:45

    The best way is to find the process engaging gpu memory and kill it:

    find the PID of python process from:

    nvidia-smi
    

    copy the PID and kill it by:

    sudo kill -9 pid
    

提交回复
热议问题