首页 > 解决方案 > 在自定义对象检测中使用 tensorflow-gpu 的错误

问题描述

我正在尝试使用 tensorflow-gpu 进行自定义对象检测。我已经使用我的 tensorflow-gpu 1.14 版创建了 conda 环境,下载并安装了 CUDA 和 CuDNN 10.0。但是,我收到了这个错误

ResourceExhaustedError: 2 root error(s) found.
  (0) Resource exhausted: OOM when allocating tensor with shape[32,1792,1792,3,2] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator gpu_host_bfc
     [[{{node Tile_5}}]]
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[32,1792,1792,3,2] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator gpu_host_bfc
     [[{{node Tile_5}}]]
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.

     [[training/Adam/cond_175/Switch_2/_6707]]
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.

按照这个网站用 6 行代码训练对象检测 AI

标签: pythontensorflowkeras

解决方案


推荐阅读