DogBreed_gluon icon indicating copy to clipboard operation
DogBreed_gluon copied to clipboard

Error:The kernel appears to have died. It will restart automatically.

Open hellozgm opened this issue 7 years ago • 4 comments

当我运行get_features.ipynb中的下面这一行: features_vgg, labels = get_features(models.vgg16_bn(pretrained=True, ctx=ctx), data)

便会出现错误:The kernel appears to have died. It will restart automatically.

然后kernel 重启, 反复循环. Jupyter notebook错误日志: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

应该不是GPU内存不足,我把前面一行:data = gluon.data.DataLoader(imgs, 64) 中的bach_size从64改成2还是报同样的错误. 系统内存也还没有用满,大概4G的样子. 请问这是怎么回事?谢谢

我的运行环境: ubuntu16.04 mxnet1.0 硬件配置: 内存: 16G gpu: gtx1080

hellozgm avatar Jan 09 '18 13:01 hellozgm

还真是内存不足,不是 GPU 的显存,而是电脑内存不足。

ypwhs avatar Jan 09 '18 13:01 ypwhs

竟然需要这么大内存.. 那有什么可以降低内存使用的方法吗?

hellozgm avatar Jan 09 '18 13:01 hellozgm

方法当然有啊,分批输出咯

ypwhs avatar Jan 09 '18 13:01 ypwhs

好的,我再试一下,多谢!

hellozgm avatar Jan 09 '18 13:01 hellozgm