Hi,
when I run inception stup python script, i see the following error:
>>>>>>>>>>>>>>>>>>>>>>>
amir@aceslab:~/snpe-1.18.0/models/inception_v3/scripts$ python setup_inceptionv3.py -a ./temp-assests.cache -d
Traceback (most recent call last):
File "setup_inceptionv3.py", line 10, in <module>
import tensorflow as tf
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_p...
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Hi amirajaee,
Does your enviornment have CUDA installed?
If so, try setting environment variable for CUDA.
Thanks,
Jihoon
Thanks Jihoon,
i've installed CUDA:
LAB:~/snpe-1.18.0/models/inception_v3/scripts$ nvcc --versionnvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Wed_Jul_17_18:36:13_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0
but I still see this error:
LAB:~/snpe-1.18.0/models/inception_v3/scripts$ python setup_inceptionv3.py
Traceback (most recent call last):
File "setup_inceptionv3.py", line 10, in <module>
import tensorflow as tf
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_p...
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Actually the issue was that my tensorflow (1.8) is aksing fur CUDA 9 and in NVIDIA page, there is no CUDA 9 for ubuntu 7.14!
So I downgraded to tensorflow 1.0 and it's working fine with CUDA 8 exisiting on my system,
Now it's asking for arguments. What arguments should I use?
LAB:~/snpe-1.18.0/models/inception_v3/scripts$ python setup_inceptionv3.py
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
usage: setup_inceptionv3.py [-h] -a ASSETS_DIR [-d]
setup_inceptionv3.py: error: argument -a/--assets_dir is required
Also, when i run:
LAB:~/snpe-1.18.0$ python ./models/inception_v3/scripts/setup_inceptionv3.py -a ./temp-assets-cache -d
I see the following error. (I have installed android sdk/ndk):
ERROR: SNPE_ROOT not setup. Please run the SDK env setup script.
I do not see such a script (environment-setup or like that) in android sdk path!
Hi amirajaee,
Please find the SNPE environment setup instructions at https://developer.qualcomm.com/docs/snpe/setup.html. I believe the heading "Environment setup for TensorFlow" contains the instructions you're looking for.
Regards,
David
Thanks David,
I have already followed the setup instructions. Here is the log for running it:
LAB:~/snpe-1.18.0$ source bin/envsetup.sh -t /usr/local/lib/python2.7/dist-packages/tensorflow/
[INFO] Setting TENSORFLOW_HOME=/usr/local/lib/python2.7/dist-packages/tensorflow/
[WARNING] Can't find ANDROID_NDK_ROOT or ndk-build. SNPE needs android ndk to build the NativeCppExample >> I have it installed though!
[INFO] Found /home/amir/snpe-1.18.0/lib/arm-android-gcc4.9/libgnustl_shared.so
[INFO] Adding armeabi-v7a libgnustl_shared.so to /home/amir/snpe-1.18.0/android/snpe-gcc-release.aar
[INFO] Found /home/amir/snpe-1.18.0/lib/aarch64-android-gcc4.9/libgnustl_shared.so
[INFO] Adding arm64-v8a libgnustl_shared.so to /home/amir/snpe-1.18.0/android/snpe-gcc-release.aar
but I still see the error. Can someone tell me what the misisng argument is here?
amir@aceslab:~/snpe-1.18.0/models/inception_v3/scripts$ python setup_inceptionv3.py
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
usage: setup_inceptionv3.py [-h] -a ASSETS_DIR [-d]
setup_inceptionv3.py: error: argument -a/--assets_dir is required
there is nothing else mentioned in setup page:
Environment setup for TensorFlow
used -a ./temp-assets-cache -d after my command and setup is completed :)