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

后端 未结 6 751
时光取名叫无心
时光取名叫无心 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-13 00:04

    The error, which you has provided is shown, because you ran out of memory on your GPU. A way to solve it is to reduce the batch size until your code will run without this error.

提交回复
热议问题