微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

RCNN模型内存耗尽

如何解决RCNN模型内存耗尽

我正在尝试在自己的数据集上运行R-CNN模型,但是遇到以下错误

2020-10-21 20:44:19.018471: W tensorflow/core/common_runtime/bfc_allocator.cc:424] *************************************************xx****x_**********************__************_******
2020-10-21 20:44:19.019036: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES Failed at bias_op.cc:507 : Resource exhausted: OOM when allocating tensor with shape[512,65536] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc

我可以在控制台中找到我的设备

2020-10-21 20:39:16.560354: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: 
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62

数据集由一个包含8000张图像的文件夹组成。图片大小介于512x512到1024x1024之间。 每个GPU的图像设置为1,STEPS_PER_EPOCH设置为3000。例如,如果我将STEPS_PER_EPOCH设置为80,则不会出错。我无法理解此参数是指一次处理的图像还是每个时期要处理的图像数。 该电脑具有16 GB的内存,其中4GB专用,8GB共享。

ERROR MESSAGE:


    ResourceExhaustedError: 2 root error(s) found.
      (0) Resource exhausted: OOM when allocating tensor with shape[200,256,14,14] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
         [[{{node mrcnn_mask_conv4_3/convolution}}]]
    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.

     [[mul_206/_18183]]
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.

  (1) Resource exhausted: OOM when allocating tensor with shape[200,14] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
     [[{{node mrcnn_mask_conv4_3/convolution}}]]
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.

0 successful operations.
0 derived errors ignored.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?