error creating mnist lmdb

2,608 views
Skip to first unread message

oconn...@gmail.com

unread,
Dec 6, 2014, 1:44:26 AM12/6/14
to caffe...@googlegroups.com
I'm a newbie. Ive installed caffe with dependencies and passed all tests post compile.

I'm attempting to complete the MNIST tutorial training, but can't build the lmdb file acquired with the get_cifar10.sh bash script. 

the error is:

~/caffe/examples/mnist$ ./create_mnist.sh
Creating lmdb...
./create_mnist.sh: 16: ./create_mnist.sh: build/examples/mnist/convert_mnist_data.bin: not found
./create_mnist.sh: 18: ./create_mnist.sh: build/examples/mnist/convert_mnist_data.bin: not found
Done.


I looked in the build/examples/mnist directory and an executable convert_mnist.data file exists and is executable but I'm missing the binary needed for the bash script. I have the same problem doing the CIFAR-10 tutorial?

What am I missing?

I looked extensively at this mailing group posts, couldn't find any problem like it. Any help would be appreciated

Friendly User

unread,
Dec 6, 2014, 4:28:18 AM12/6/14
to caffe...@googlegroups.com
You are almost there:
 just rename convert_mnist_data to convert_mnist_data.bin
( or modify the script accordingly)
 somehow the binary was renamed inconsistently

Mohamed Omran

unread,
Dec 6, 2014, 5:21:43 AM12/6/14
to oconn...@gmail.com, caffe...@googlegroups.com
You need to call the script from the Caffe root folder, so:

cd ~/caffe
./examples/mnist/create_mnist.sh


--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/9fd3f758-2308-42a9-9725-b2b014ab666a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

oconn...@gmail.com

unread,
Dec 6, 2014, 1:46:01 PM12/6/14
to caffe...@googlegroups.com
i did figure out the problem. It was in the caff/examples CMakeLists.txt file.  

I changed:
add_executable(${name}.bin ${source})
    target_link_libraries(${name} caffe)
    set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${folder})

to:
add_executable(${name}.bin ${source})
    target_link_libraries(${name}.bin caffe)
    set_target_properties(${name}.bin PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${folder})

and was able to finally train the MNIST data set, so I was able to train an example finally.

Now I am trying to train the CIFAR10 data set and the shell scripts for that tutorial are all messed up. 

caffe/examples/cifar10$ ./create_cifar10.sh
Creating leveldb...
./create_cifar10.sh: 11: ./create_cifar10.sh: ./build/examples/cifar10/convert_cifar_data.bin: not found
Computing image mean...
./create_cifar10.sh: 15: ./create_cifar10.sh: ./build/tools/compute_image_mean: not found
Done.

looking through the get_cifar10.sh and create_cifar10.sh scripts, I am unable to locate the `./cifar10-leveldb`, and the data set image mean `./mean.binaryproto`. files that get_cifar10.sh is supposed to create. 



thanks for the reply Friendly User, 

oconnor132

Dheeru91

unread,
Jan 30, 2015, 7:14:44 PM1/30/15
to caffe...@googlegroups.com
Hi, I changed it the same way you did. Changed caffe/examples CMakeLists.txt file but still facing :

./create_mnist.sh: 16: ./create_mnist.sh: build/examples/mnist/convert_mnist_data.bin: not found
./create_mnist.sh: 18: ./create_mnist.sh: build/examples/mnist/convert_mnist_data.bin: not found

Please let me know what to do. I am a newbie. I would appreciate if you can provide me with detailed instructions on how to run th MNIST on caffe. The official documentation is hard to figure out and also i am facing errors in each step.

Thanks in advance.

Steven Clark

unread,
Feb 3, 2015, 10:14:03 AM2/3/15
to caffe...@googlegroups.com
I think I did something like:
cd build/examples/mnist
ln -s convert_mnist_data convert_mnist_data.bin
 
(create symlink to point to real file)

mahdieh abbasi

unread,
Sep 20, 2015, 4:12:51 PM9/20/15
to Caffe Users, oconn...@gmail.com
I had this problem and by running create_cifar10.sh from Caffe root folder, successfully ran cifar10.
Thank you 
Reply all
Reply to author
Forward
0 new messages