I have followed all installation instructions to install caffe in Ubuntu 14.04. And
make all
make test
make runtest
Everything is ok. All tests have passed. But when I ran the MNIST demo there are something wrong like this:
$ ./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.
In fact, “convert_mnist_data.bin” existed and its address was correct.
I'm a linux/Ubuntu novice. I have no any idea. So any pointers would be much appreciated.
All examples should be run from the Caffe root dir -- this example's documentation wasn't updated, but has been now: http://caffe.berkeleyvision.org/gathered/examples/mnist.html
@shelhamer Thank you very much! It works. And thanks to the caffe. Very nice work!
I'm having the same problem, and I checked the $CAFFE_ROOT/build directory for the examples folder, yet all I see in the build folder is: lib, src, test, tools. Did my caffe compilation not work fully, and there is supposed to be an examples folder there?
@ErnstHowie I've encountered the same problem. I followed all the instructions but I still can't figure out what's wrong. Can you tell me how you solve this problem?
@zirohut @mtmarsh2
I just followed the way @shelhamer said:
"All examples should be run from the Caffe root dir -- this example's documentation wasn't updated, but has been now: http://caffe.berkeleyvision.org/gathered/examples/mnist.html."
Then it works perfect.
@ErnstHowie Could you tell me what happens when you run 'ls' in $CAFFE_ROOT/build/examples/mnist? All I have in that directory is 'convert_mnist_data', but according to the error I should have: 'convert_mnist_data.bin', which is the file I have except with a '.bin' extension.
@ErnstHowie
It works. Thank you!
@mtmarsh2 You can't run from the 'examples' or other dir, you must run from the Caffe root dir. Please see "The guide specifies all paths and assumes all commands are executed from the root caffe directory" : http://caffe.berkeleyvision.org/gathered/examples/imagenet.html.
@zirohut You're welcome :)
@ErnstHowie, vi ./examples/mnist/create_mnist.sh, change 'convert_mnist_data.bin' to 'onvert_mnist_data'
@guoyilin: why this works? But there is 'convert_mnist_data.cpp'
@jhuxiang , because after using cmake for building, I see $build/examples/mnist/convert_mnist_data, not 'convert_mnist_data.bin'
Recompiling everything again with
make all
make test
make runtest
and then executing
cd $CAFFE_ROOT
./data/mnist/get_mnist.sh
./examples/mnist/create_mnist.sh
as mentioned in http://caffe.berkeleyvision.org/gathered/examples/mnist.html
I could run the example 01-learning-lenet.ipynb commenting out the commands in # Download and prepare data Inline.
Thanks guys!
Cheers
@guoyilin sorry, I don't have the ''build'' folder, do you know why?
@renexdev : Instead of using make, can I use Visual Studio by opening the Caffe.sln file in /windows/ ?
In my case, I used VS 2013 to build Caffe.sln.
After the build, I ran caffe.exe and what displayed on the promt was ok (command instruction).
Files were generated into ~\caffe-windows\Build\x64\Release.
However, convert_mnist_data.bin was not found in any folder.
Update! I was able to run it in Command Prompt
I haven't try with VS, instead I ran it in the linux command line. Nice that it works!
I run the same thing, correctly from $CAFFE_ROOT:
./examples/mnist/create_mnist.sh
Creating lmdb...
./examples/mnist/create_mnist.sh: line 17: build/examples/mnist/convert_mnist_data.bin: No such file or directory
But when I check my examples/mnist/ directory, there is actually no convert_mnist_data.bin, there is only a convert_mnist_data.cpp.
Is there any reason this would be the case. @guoyilin @jhuxiang changing create_mnist.sh 's line convert_mnist_data.bin to convert_mnist_data doesn't seem to work for me either.
@ErnstHowie
I have followed all installation instructions to install caffe in Ubuntu 16.04. And
make all
make test
everything is ok.when I make runtest, there are something wrong like this:
..............
* Error in `.build_release/tools/caffe': double free or corruption (out): 0x0000000000ace160 *
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7efe158137e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7efe1581be0a]
................
I would appreciate confirmation of your idea.
when I train mnist data,there are something wrong like this:
....................
I0327 14:02:41.466557 5386 solver.cpp:404] Test net output #0: accuracy = 0.9913
I0327 14:02:41.466598 5386 solver.cpp:404] Test net output #1: loss = 0.0264472 (* 1 = 0.0264472 loss)
I0327 14:02:41.466612 5386 solver.cpp:322] Optimization Done.
I0327 14:02:41.466624 5386 caffe.cpp:222] Optimization Done.
* Error in `./build/tools/caffe': free(): invalid next size (normal): 0x00000000008fc160 *
...............
looking forward to your suggestion.
In ubuntu try:
sudo cp convert_mnist_data.bin [_caffe_path_]/build/examples/mnist/
Worked for me
remove build in examples/mnist/create_mnist.sh works for me

I also happen to this problem. And I solve it. I just make clean and re-compiled it again, then it works.
I am on Anaconda environment, facing the same issue(convert_mnist_data.bin: not found). How should i approch to solve this problem? is it okay to recompile this conda caffe pakage?
@mintisan i remove build in examples/mnist/create_mnist.sh, and that way works for me. but why it work? do you know why?
the reason that there didn't exist "convert_mnist_data.bin" is i used this order "make clean" before i keyed "make pycaffe" . inputting "make all, make test, make runtest" one by one solved my problem.
I run the same thing, correctly from $CAFFE_ROOT:
./examples/mnist/create_mnist.sh Creating lmdb... ./examples/mnist/create_mnist.sh: line 17: build/examples/mnist/convert_mnist_data.bin: No such file or directoryBut when I check my examples/mnist/ directory, there is actually no
convert_mnist_data.bin, there is only aconvert_mnist_data.cpp.Is there any reason this would be the case. @guoyilin @jhuxiang changing
create_mnist.sh's lineconvert_mnist_data.bintoconvert_mnist_datadoesn't seem to work for me either.
Maybe you have solved this problem.I solved by doing this:
cd $CAFFE_ROOT
./data/mnist/get_mnist.sh
.But if your operation is Win10 x64,
you should modify create_mnist.sh(plz copy one as backup) : BUILD=your relatively path of 'convert_mnist_data.exe' and replace 'convert_mnist_data.bin' with 'convert_mnist_data.exe',then
./examples/mnist/create_mnist.sh.
If you have problem to run .sh file in Windows,plz install git ,wget, and run it in git.shell.Here you go,enjoy your CaffeO(∩_∩)O
I run the same thing, correctly from $CAFFE_ROOT:
./examples/mnist/create_mnist.sh Creating lmdb... ./examples/mnist/create_mnist.sh: line 17: build/examples/mnist/convert_mnist_data.bin: No such file or directoryBut when I check my examples/mnist/ directory, there is actually no
convert_mnist_data.bin, there is only aconvert_mnist_data.cpp.
Is there any reason this would be the case. @guoyilin @jhuxiang changingcreate_mnist.sh's lineconvert_mnist_data.bintoconvert_mnist_datadoesn't seem to work for me either.Maybe you have solved this problem.I solved by doing this:
cd $CAFFE_ROOT
./data/mnist/get_mnist.sh
.But if your operation is Win10 x64,
you should modify create_mnist.sh(plz copy one as backup) : BUILD=your relatively path of 'convert_mnist_data.exe' and replace 'convert_mnist_data.bin' with 'convert_mnist_data.exe',then
./examples/mnist/create_mnist.sh.
If you have problem to run .sh file in Windows,plz install git ,wget, and run it in git.shell.Here you go,enjoy your CaffeO(∩_∩)O
Thank you very much! it works for me!!!
Most helpful comment
All examples should be run from the Caffe root dir -- this example's documentation wasn't updated, but has been now: http://caffe.berkeleyvision.org/gathered/examples/mnist.html