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

读Resnet.prototxt错误 #11

Closed
dimens66 opened this issue May 10, 2017 · 6 comments
Closed

读Resnet.prototxt错误 #11

dimens66 opened this issue May 10, 2017 · 6 comments

Comments

@dimens66
Copy link

dimens66 commented May 10, 2017

你好,请教一个问题。我在读Resnet.prototxt时发生了错误。我编的是arm-v7a的so,另外采用新版本的工具转换成binayproto也没有成功。目前读cifar10.prototxt可以,但是读resnet不行。在pc上读同样的模型都没有问题,只要放在android上就不行。请问这是什么原因?

错误定位:
net_.reset(new Net(param_file, caffe::TEST));
这一句跑不过。
进net构造函数中,定位到是最后一个函数Init(param);中crash。目前暂未找到问题在哪。

@solrex
Copy link
Owner

solrex commented May 10, 2017

@ChangyeGuo 把 prototxt 文件作为附件上传上来吧,我试着看下。

@dimens66
Copy link
Author

dimens66 commented May 10, 2017

@solrex 附件没法上传,我分享到了百度网盘了。麻烦看一下。
链接:http://pan.baidu.com/s/1c2zRuy0 密码:mhd0

@solrex
Copy link
Owner

solrex commented May 10, 2017

@ChangyeGuo 抱歉,我当初只关注了 layer_factory.cpp 里列出的 layer,遗漏了一些 resnet 依赖的 layer。我已补充这些 layer 326fe37 ,自测是没问题了,麻烦更新代码再试一下。

@dimens66
Copy link
Author

@solrex resnet已经能读取,谢谢。
现更新最新的repo后,编译时发生错误。信息如下:
make[1]: Leaving directory `/home/guocy/caffe-mobile-511/third_party/OpenBLAS-0.2.19'
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:99 (message):
Could not find toolchain file:
../third_party/android-cmake/android.toolchain.cmake
Call Stack (most recent call first):

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: /home/guocy/caffe-mobile-511/build_armeabi/CMakeFiles/2.8.12.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: /home/guocy/caffe-mobile-511/build_armeabi/CMakeFiles/2.8.12.2/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

问题分析:初步分析应该是build-protobuf-3.1.0.sh的136行:
ln -sf ../../protobuf-Linux/bin/protoc protoc 没有软链接成功。我把这一句comment,再把/Linux-protobuf/bin/protoc拷贝到android-protobuf文件夹下,然后就可以编译了。
请修复。
BEST LUCK!!!

@xueyedamo
Copy link

build-protobuf-3.1.0.sh脚本里面function build-Android 里面缺少了个cd ..造成cmake路径不对,还有这个软连接不对,文件夹名字错了,正确的是ln -sf ../../Linux-protobuf/bin/protoc protoc

@solrex
Copy link
Owner

solrex commented May 11, 2017

Fixed in ca1ac2c

solrex added a commit that referenced this issue May 11, 2017
@solrex solrex closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants