https://developer.qualcomm.com/docs/snpe/tutorial_setup.html
In following the above tutorial, I come to this point :
usage: $SNPE_ROOT/models/inception_v3/scripts/setup_inceptionv3.py [-h] -a ASSETS_DIR [-d] [-r RUNTIME] [-u]
The process returns "ImportError: No module named 'tensorflow.contrib". After scouting for some reolsutions , it seems that tf.contrib is not supported in Tensorflow 2.x .
I am using Tensforflow 2.2.0 - gpu , Cuda 10.2 and cuDNN 7.6.5. It took a while to set eveything up and now I am not going to downgrade to Tensorflow 1, what is the solution to convert SNPE-TENSORFLOW-DLC using Tensorflow 2.x.
Thanks
Partial screendump :
INFO: Creating image list data files
/home/jerry/snpe-root/models/inception_v3/data/cropped/raw_list.txt created listing 4 files.
/home/jerry/snpe-root/models/inception_v3/data/target_raw_list.txt created listing 4 files.
INFO: Converting inception_v3_2016_08_28_frozen.pb to SNPE DLC format
['snpe-tensorflow-to-dlc', '--input_network', '/home/jerry/snpe-root/models/inception_v3/tensorflow/inception_v3_2016_08_28_frozen.pb', '--input_dim', 'input', '1,299,299,3', '--out_node', 'InceptionV3/Predictions/Reshape_1', '--output_path', '/home/jerry/snpe-root/models/inception_v3/dlc/inception_v3.dlc', '--allow_unconsumed_nodes']
Traceback (most recent call last):
File "/home/jerry/snpe-root/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 24, in <module>
from snpe.converters.tensorflow.tf_to_ir import TFConverter
File "/home/jerry/snpe-root/lib/python/snpe/converters/tensorflow/tf_to_ir.py", line 19, in <module>
from snpe.converters.tensorflow.loader import ModelLoader
File "/home/jerry/snpe-root/lib/python/snpe/converters/tensorflow/loader.py", line 14, in <module>
import tensorflow.contrib
ImportError: No module named 'tensorflow.contrib'
INFO: Setup inception_v3 completed.
Hi Jerry,
We run the latest NPE 1.38 with the Ubuntu 16 having TF 1.13.1 without any issues using python3.5
Run the following command to install python3.5
TF2 version is not fully supported yet. So, it is suggested to use the TF 1.13.1 or TF 1.15
We run the latest NPE 1.38 with the Ubuntu 16 having TF 1.13.1 without any issues.
post-installation, possibly you can find the TensorFlow in the below-mentioned path.