OOM

在mnist上测试卷积网络时,显存不够导致下面的报错: 

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[10000,32,28,28] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[node layer1-conv1/Conv2D (defined at /home/yangxl/files/PycharmProjects/yangxl/mnist_inference.py:27) = Conv2D[T=DT_FLOAT, data_format="NCHW", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](layer1-conv1/Conv2D-0-TransposeNHWCToNCHW-LayoutOptimizer, layer1-conv1/weight/read)]]
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.

 

posted @ 2019-03-03 12:47  羊小羚  阅读(487)  评论(0编辑  收藏  举报