解開,follow getting start, rename to snpe-sdk
follow instructions, install tensorflow on ~/tensorflow:
sudo apt-get install python-pip python-dev python-virtualenv mkdir ~/tensorflow; virtualenv --system-site-packages ~/tensorflow; source ~/tensorflow/bin/activate pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl其實就是參考 tensorflow, intall linux
run dependencies.sh 和 check_python_depends.sh 檢查系統需要的 package 是不是都 OK 了。
設好環境變數 ANDROID_NDK_ROOT 之後,run tensorflow 的環境設定:
source ~/snpe-sdk/bin/envsetup.sh -t ~/tensorflow/ INFO: Setting TENSORFLOW_HOME=/home/charles-chang/tensorflow/ INFO: Found ANDROID_NDK_ROOT at /home/charles-chang/Android/Sdk/ndk-bundle WARNING: Cannot find /home/charles-chang/snpe-sdk/lib/arm-android-gcc4.9/libgnustl_shared.so libgnustl_shared.so found at /home/charles-chang/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so copying to /home/charles-chang/snpe-sdk/lib/arm-android-gcc4.9 INFO: Adding libgnustl_shared.so to /home/charles-chang/snpe-sdk/android/snpe-release.aar adding: jni/armeabi-v7a/libgnustl_shared.so (deflated 66%) WARNING: Cannot find /home/charles-chang/snpe-sdk/lib/aarch64-android-gcc4.9/libgnustl_shared.so libgnustl_shared.so found at /home/charles-chang/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/libgnustl_shared.so copying to /home/charles-chang/snpe-sdk/lib/aarch64-android-gcc4.9 INFO: Adding libgnustl_shared.so to /home/charles-chang/snpe-sdk/android/snpe-release.aar adding: jni/arm64-v8a/libgnustl_shared.so (deflated 73%)
download tensorflow model
source ~/tensorflow/bin/active python models/inception_v3/scripts/setup_inceptionv3.py -a ./temp-assets-cache -d
2021 update --
snpe-1.49
說需要知道 tensorflow install folder.
我是用 conda 安裝,所以是在
~/miniconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow
額外需要...說..
SDK Android binaries built with clang require libc++_shared.so which is shipped with the SDK. (See Platform Runtime Libraries below).但是好像是用 ndk build native C++ program 才要?
這個在/usr/lib/x86_64-linux-gnu/libatomic.so.1
system ld path,所以應該不用 copy...
沒有留言:
張貼留言