Caffe |检查失败:错误== cudaSuccess(2对0)内存不足 [英] Caffe | Check failed: error == cudaSuccess (2 vs. 0) out of memory

查看:3793
本文介绍了Caffe |检查失败:错误== cudaSuccess(2对0)内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Caffe上训练一个网络。我有512x640的图像大小。批量大小为1.我尝试实施 FCN-8s



我目前在具有4GB GPU内存的Amazon EC2实例(g2.2xlarge)上运行此操作。但是当我运行求解器时,它会立即抛出一个错误


 检查失败:error == cudaSuccess(2对0)内存不足
***检查故障堆栈跟踪:***
中止(内核转储)

有人可以帮我从这里继续吗?

解决方案

你得到的错误确实是内存不足,但它不是RAM,而是GPU内存(注意错误来自CUDA)。

通常,当caffe是内存不足时 - 首先要做的是减少批量大小(以渐变精度为代价),但由于您已经在批处理size = 1 ...

您确定两个 TRAIN和TEST阶段的批次大小为1吗?


I am trying to train a network on Caffe. I have image size of 512x640. Batch size is 1. I'm trying to implement FCN-8s.

I am currently running this on a Amazon EC2 instance (g2.2xlarge) with 4GB of GPU memory. But when I run the solver, it immediately throws out an error

Check failed: error == cudaSuccess (2 vs. 0)  out of memory
*** Check failure stack trace: ***
Aborted (core dumped)

Can someone help me proceed from here?

解决方案

The error you get is indeed out of memory, but it's not the RAM, but rather GPU memory (note the the error comes from CUDA).
Usually, when caffe is out of memory - the first thing to do is reduce the batch size (at the cost of gradient accuracy), but since you are already at batch size = 1...
Are you sure batch size is 1 for both TRAIN and TEST phases?

这篇关于Caffe |检查失败:错误== cudaSuccess(2对0)内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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