Reputation: 489
I am new to caffe. To train Lenet with mnist dataset,I downloaded the data to the data/mnist in caffe.
When trying to convert to lmdb, using ./examples/mnist/create_mnist.sh
, I get error as :
Creating lmdb...
F0225 16:39:23.937786 23330 convert_mnist_data.cpp:45] Check failed: image_file Unable to open file data/mnist/train-images-idx3-ubyte
*** Check failure stack trace: ***
@ 0x7f5d0f0e8daa (unknown)
@ 0x7f5d0f0e8ce4 (unknown)
@ 0x7f5d0f0e86e6 (unknown)
@ 0x7f5d0f0eb687 (unknown)
@ 0x4045df convert_dataset()
@ 0x402943 main
@ 0x7f5d0de99ec5 (unknown)
@ 0x40298c (unknown)
@ (nil) (unknown)
Aborted (core dumped)
F0225 16:39:24.025714 23334 convert_mnist_data.cpp:45] Check failed: image_file Unable to open file data/mnist/t10k-images-idx3-ubyte
*** Check failure stack trace: ***
@ 0x7faa1af57daa (unknown)
@ 0x7faa1af57ce4 (unknown)
@ 0x7faa1af576e6 (unknown)
@ 0x7faa1af5a687 (unknown)
@ 0x4045df convert_dataset()
@ 0x402943 main
@ 0x7faa19d08ec5 (unknown)
@ 0x40298c (unknown)
@ (nil) (unknown)
Aborted (core dumped)
Done.
Can somebody help me with this? What exactly could be the issue?
Upvotes: 4
Views: 1859
Reputation: 1
You should run your script from the $CAFFE_ROOT, such as the following:
sudo sh /examples/mnist/create_mnist.sh
Upvotes: 0
Reputation: 11
Download the mnist dataset from another location (http://yann.lecun.com/exdb/mnist/), place them in $CAFFE_ROOT/data/ and unzip them. After that ./examples/mnist/create_mnist.sh works when run from $CAFFE_ROOT. At least for me it worked.
Upvotes: 0
Reputation: 1
I met the same problem. In $CAFFE_ROOT/data/minist/get_mnist.sh, line 15: gunzip ${fname}.gz I use ubuntu 14.04 and I don't know why it failed when gunzip train-images-idx3-ubyte.tz and t10k-images-idx3-ubyte.tz.
As a result, there are no train-images-idx3-ubyte and t10k-images-idx3-ubyte. In $CAFFE_ROOT/examples/mnist/create_mnist.sh, it failed to convert them to lmdb format.
So I just gunzip them in OSX and then conversion worked.
Upvotes: 0
Reputation: 21
rename your mnist dataset,because you downloaded mnist dataset maybe was "t10k-images.idx3-ubyte" but it is the "t10k-images-idx3-ubyte" in create_mnist.sh,so you have to use '-'instead of '.'
Upvotes: 2
Reputation: 412
You can use absolutely path not like data/mnist/t10k-images-idx3-ubyte
.caffe sometimes can't get it.
Upvotes: 2
Reputation: 489
The manual compilation worked, though the script failed for unknown reason.
Upvotes: 2