我是靠谱客的博主 开朗短靴,这篇文章主要介绍bug6-ResourceExhaustedError: OOM when allocating tensor with shape[512,15,15,128],现在分享给大家,希望可以做个参考。

完整错误:

tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating
 tensor with shape[512,15,15,128] and type float on /job:localhost/replica:0/task:0
 /device:GPU:0 by allocator GPU_0_bfc [Op:Conv2D]

解决方法:
出现以上类似的错误,主要是因为模型中的batch_size值设置过大,导致内存溢出,batch_size是每次送入模型中的值,由于GPU的关系,一般设为16,32,64,128。

最后

以上就是开朗短靴最近收集整理的关于bug6-ResourceExhaustedError: OOM when allocating tensor with shape[512,15,15,128]的全部内容,更多相关bug6-ResourceExhaustedError:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部