我是靠谱客的博主 单纯大炮,这篇文章主要介绍报错解决:ResourceExhaustedError: OOM when allocating tensor with shape[1,36864,36864],现在分享给大家,希望可以做个参考。
运行代码报错:Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocatio [Op:__inference_predict_function_5604]
百度看到有人说显存不够,减小batchsize,然后我减小到1还是不行,最后发现是我文件开头加的三行代码(见下图)的问题,删除后就解决了。真的服了,害我搞了半天。
gpu_options = tf.compat.v1.GPUOptions(allow_growth=True)
config = tf.compat.v1.ConfigProto(gpu_options=gpu_options)
session = tf.compat.v1.Session(config=config)
最后
以上就是单纯大炮最近收集整理的关于报错解决:ResourceExhaustedError: OOM when allocating tensor with shape[1,36864,36864]的全部内容,更多相关报错解决:ResourceExhaustedError:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复