为什么老是这种问题 Out of memory
收藏
ResourceExhaustedError:
Out of memory error on GPU 0. Cannot allocate 20.250244MB memory on GPU 0, available memory is only 20.625000MB.
Please check whether there is any other process using GPU 0.
1. If yes, please stop them, or start PaddlePaddle on another GPU.
2. If no, please decrease the batch size of your model.
at (/paddle/paddle/fluid/memory/allocation/cuda_allocator.cc:69)
0
收藏
请登录后评论
这就是经典的内存爆了啊,建议从改小batchsize开始尝试。清除中间变量,实在不行就用脚本任务,用四卡一起跑。
有没有可能,是notebook没清缓存
这种情况是显卡内存不够了,有如下解决办法:
1. 改小batch_size;
2. 选用小模型;
3. 换更大显卡内存的机器;
4. 利用多卡,模型并行。
买显卡啊,显卡有了啥都有
改batchsize改错地方了,所以一直用着很大的batchsize跑,哈哈我这个错误大家引以为鉴。
减小一下模型的参数吧,每一个模型的参数在不同的显卡设备上总会有显存上限极限的参数的。你这种情况就是参数不能被显卡给吃下去呢。
学习了
改在什么地方修改呢?
改那个文件呀
兄弟,最后是改的哪个文件的 batch_size 啊
改的是哪个文件的呀,兄弟