facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.95k forks source link

Caffe2 doesn't work on Android with almost all models #944

Open tiancaishaonvjituizi opened 7 years ago

tiancaishaonvjituizi commented 7 years ago

I builded caffe2 for android and used the generated files like the demo. Though the app works with the original squeezenet model, but when I changed the model to GoogLeNet (from caffe2 model zoo) or my own model, it doesn't work. The app stuck when using GoogLeNet, and net->ParseFromArray(data, len) returns false when loading my own model's init.pb. Even when I just added and changed model directly in the demo, I got the same result.

tiancaishaonvjituizi commented 7 years ago

I tried both the current code and version v0.7.0. The result are the same.

lzx1413 commented 7 years ago

your id is very interesting and I think you can try to check the prototxt between the googlenet and squeeze net, the data layer may be the reason

tiancaishaonvjituizi commented 7 years ago

@lzx1413 Thanks, I will check it. But net->ParseFromArray simply returned false with my own model while it works correctly on PC. :\

lzx1413 commented 7 years ago

@tiancaishaonvjituizi have you checked the binary data and the length of the data

MorningMyFriend commented 6 years ago

@tiancaishaonvjituizi i got the same problem. Have you solved this problem , and could you tell me how can i fix this problem ? i convert a caffemodel and seccess run it with caffe2 python API, but i found it return failed on Android : net->ParseFromArray return false

xumengwei commented 6 years ago

I have the same issue with the latest version of caffe2. Anyone works this out?