错误:分配具有形状的张量时出现OOM [英] Error: OOM when allocating tensor with shape

查看:146
本文介绍了错误:分配具有形状的张量时出现OOM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Apache JMeter进行性能测试期间,我的初始模型遇到了问题.

错误:分配带有shape [800,1280,3]和类型的张量时,OOM 通过分配器浮动在/job:localhost/replica:0/task:0/device:GPU:0上 GPU_0_bfc [[Node:Cast = CastDstT = DT_FLOAT,SrcT = DT_UINT8, _device ="/job:localhost/副本:0/task:0/device:GPU:0"]] 提示:如果您希望在发生OOM时看到分配的张量列表, 将report_tensor_allocations_upon_oom添加到当前的RunOptions 分配信息.

解决方案

OOM表示内存不足.这意味着您的GPU空间不足,可能是因为您分配了其他过大的张量.您可以通过缩小模型或减小批次大小来解决此问题.从外观上看,您正在输入一张大图像(800x1280),您可能需要考虑下采样.<​​/p>

i am facing issue with my inception model during the performance testing with Apache JMeter.

Error: OOM when allocating tensor with shape[800,1280,3] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [[Node: Cast = CastDstT=DT_FLOAT, SrcT=DT_UINT8, _device="/job:localhost/replica:0/task:0/device:GPU:0"]] Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

解决方案

OOM stands for Out Of Memory. That means that your GPU has run out of space, presumably because you've allocated other tensors which are too large. You can fix this by making your model smaller or reducing your batch size. By the looks of it, you're feeding in a large image (800x1280) you may want to consider downsampling.

这篇关于错误:分配具有形状的张量时出现OOM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆