caffe icon indicating copy to clipboard operation
caffe copied to clipboard

MNIST example : data_layer.cpp:61] Check failed: mdb_env_open

Open asa88 opened this issue 12 years ago • 4 comments

I am getting the following error on running ./train_lenet.sh for the MNIST example :

I1003 22:00:30.171175 2111 net.cpp:67] Creating Layer mnist I1003 22:00:30.171239 2111 net.cpp:356] mnist -> data I1003 22:00:30.171288 2111 net.cpp:356] mnist -> label I1003 22:00:30.171334 2111 net.cpp:96] Setting up mnist F1003 22:00:30.171702 2111 data_layer.cpp:61] Check failed: mdb_env_open(mdb_env_, this->layer_param_.data_param().source().c_str(), 0x20000|0x200000, 0664) == 0 (2 vs. 0) mdb_env_open failed *** Check failure stack trace: *** @ 0x7f4685d65daa (unknown) @ 0x7f4685d65ce4 (unknown) @ 0x7f4685d656e6 (unknown) @ 0x7f4685d68687 (unknown) @ 0x4b3260 caffe::DataLayer<>::DataLayerSetUp() @ 0x4a31ef caffe::BaseDataLayer<>::LayerSetUp() @ 0x4a37b9 caffe::BasePrefetchingDataLayer<>::LayerSetUp() @ 0x465731 caffe::Net<>::Init() @ 0x46703e caffe::Net<>::Net() @ 0x4703a0 caffe::Solver<>::InitTrainNet() @ 0x471606 caffe::Solver<>::Init() @ 0x471766 caffe::Solver<>::Solver() @ 0x415650 caffe::GetSolver<>() @ 0x411b44 train() @ 0x40ef21 main @ 0x7f4682ff6ec5 (unknown) @ 0x410691 (unknown) @ (nil) (unknown) Aborted (core dumped)

Any idea what might be causing this ?

asa88 avatar Oct 04 '14 02:10 asa88

I also encountered this problem. having no idea

lixin7895123 avatar Oct 09 '14 02:10 lixin7895123

The examples need to be run from the caffe project directory #1251. The example text has been updated http://caffe.berkeleyvision.org/gathered/examples/mnist.html

shelhamer avatar Oct 10 '14 04:10 shelhamer

I had a similar problem, I found out that examples/mnist/create_mnist.sh failed to execute because file build/examples/minist/convert_mnist_data.bin is referenced inside of it but it doesn't exist. So I created a symbolic link of build/examples/mnist/convert_mnist_data to build/examles/mnist/convert_mnist_data.bin.

And then called examples/mnist/create_mnist.sh again.

After that I was able to run the training.

andresromero avatar Dec 23 '14 15:12 andresromero

I'm having exactly the same problem, but with my own data instead (using create_imagenet.sh). I have created the .mdb files without any problem, but I don't know how to solve this issue.

jes93 avatar Feb 27 '15 13:02 jes93