Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run ./bin/caffe train through android adb #35

Open
strin opened this issue Jan 28, 2016 · 6 comments
Open

run ./bin/caffe train through android adb #35

strin opened this issue Jan 28, 2016 · 6 comments
Labels

Comments

@strin
Copy link

strin commented Jan 28, 2016

I compiled caffe-android-lib successfully for armeabi-v7a, and would like to train a model
directly on phone.

Without hassling with UI, I decide to run caffe binary through adb shell. After having the
root permission, I run

./bin/caffe train -solver examples/mnist/lenet_solver.prototxt

However, I got a segmentation fault.

Meanwhile, using libcaffe.so in Android app works perfectly.

@sh1r0
Copy link
Owner

sh1r0 commented Jan 29, 2016

I guess that you used some io lib format (say, lmdb in mnist example) as your data input which is not supported yet (please refer to this and this).
BTW, root permission is not required to run executable in adb shell.

@sh1r0 sh1r0 added the bug label May 29, 2016
@elife33
Copy link

elife33 commented Nov 17, 2016

I also got a segmentation fault when I run
./bin/caffe time -model lenet.prototxt

@strin @sh1r0 Have you found the solution?

@DevilGragon
Copy link

DevilGragon commented Jan 19, 2017

I also got this problem when I run ./caffe train --solver=lenet_solver.prototxt
And I met some other problem.
Before run this model, I compile caffe-android-lib on ubuntu 14.04 using ndk-r11c as required and compiled successfully with armeabi-v7a. But I try to run binary file, convert_mnist_data, on NanoPC T2, error message “This example requires LevelDB and LMDB; compile with USE_LEVELDB and USE_LMDB.” Thus I go to see conver_mnist_data.cpp, Makefile and Makefile.comfig. When I modified Makefile.config "USE_LEVELDB := 1 USE_LMDB := 1"to ensure that in convert_mnist_data.cpp we have defined USE_LEVELDB && USE_LMDB, but got the same result.
@sh1r0 could you give me some advice?

@sh1r0
Copy link
Owner

sh1r0 commented Jan 20, 2017

@elife33 @DevilGragon
Sorry, it's a known issue and I cannot find the root cause so far.

@sh1r0
Copy link
Owner

sh1r0 commented Jan 20, 2017

@DevilGragon
You could do the conversion job on linux. By the way, I'm not sure if it's a good idea to train models on Android devices.

@zzzxxccvv
Copy link

actually, it does not compile the src/solvers/*. so I think the train function will not work. While I am looking forward to make it work, for example the mnist train use the sgd_solver.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants