Keras/TensorFlow报错CUDA_ERROR_OUT_OF_MEMORY:

在使用Keras的model.predict时遇到CUDA错误:CUDA_ERROR_OUT_OF_MEMORY。即使GPU有8GB显存,依然报内存不足。错误日志显示多次尝试分配内存失败。解决方法是通过代码限制GPU内存占用率。
摘要由CSDN通过智能技术生成

用keras的model.predict时报错如下:

failed to allocate 4.00G (4294967296 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
2019-03-07 10:24:00.610883: E tensorflow/stream_executor/cuda/cuda_driver.cc:806] failed to allocate 3.60G (3865470464 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
2019-03-07 10:24:00.613876: E tensorflow/stream_executor/cuda/cuda_driver.cc:806] failed to allocate 3.24G (3478923264 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
2019-03-07 10:24:00.617918: E tensorflow/stream_executor/cuda/cuda_driver.cc:806] failed to allocate 2.92G (3131030784 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
2019-03-07 10:24:00.621197: E tensorflow/stream_executor/cuda/cuda_driver.cc:806] failed to allocate 2.62G (2817927680 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
2019-03-07 10:24:00.624652: E tensorflow/stream_executor/cuda/cuda_driver.cc:806] failed to allocate 2.36G (2536

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值