Forums - Needed the froxen model binary mobilenet_v1.pb

3 posts / 0 new
Last post
Needed the froxen model binary mobilenet_v1.pb
prabukumar
Join Date: 8 Feb 21
Posts: 19
Posted: Tue, 2021-11-09 05:55

Hi ,

I would like to evaluate a model on snpe with qcs610 processor.

I am referring to the learning resources provided on qualcomm site mentioned below.

https://developer.qualcomm.com/qualcomm-qcs610-development-kit/learning-...

 

Could some one provide the mobilenet_v1.pb, which is mentioned in the site .

snpe-tensorflow-to-dlc --input_network mobilenet_v1.pb --input_dim input "1,224,224,3" --out_node "conv2d_110/BiasAdd" --output_path mobilenet_v1.dlc --allow_unconsumed_nodes

I would like to follow the exact same steps as provided in the site.

 

Thank you,

 

 

 

  • Up0
  • Down0
SahilBandar
Join Date: 23 May 18
Posts: 37
Posted: Tue, 2021-11-09 18:42

Hi Prabukumar,

Please download the mobilenetv1 model from the link given below:
http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_...

Hope this will help out.

Regards,
Sahil Bandar

  • Up0
  • Down0
prabukumar
Join Date: 8 Feb 21
Posts: 19
Posted: Tue, 2021-11-09 21:22

Hi Sahil,

When I try the frozen_graph.pb from the link you provided , I get the below error .

snpe-1.55.0.2958$ ./bin/x86_64-linux-clang/snpe-tensorflow-to-dlc --input_network ../mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_frozen.pb --input_dim input "1,224,224,3" --out_node "conv2d_110/BiasAdd" --output_path mobilenet_v1.dlc --allow_unconsumed_nodes
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:521: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
usage: snpe-tensorflow-to-dlc -d INPUT_NAME INPUT_DIM --out_node OUT_NAMES
                              [--input_type INPUT_NAME INPUT_TYPE]
                              [--input_encoding INPUT_NAME INPUT_ENCODING]
                              [--debug [DEBUG]] [--show_unconsumed_nodes]
                              [--saved_model_tag SAVED_MODEL_TAG]
                              [--saved_model_signature_key SAVED_MODEL_SIGNATURE_KEY]
                              [--quantization_overrides QUANTIZATION_OVERRIDES]
                              [--keep_quant_nodes]
                              [--disable_batchnorm_folding] --input_network
                              INPUT_NETWORK [-h] [-o OUTPUT_PATH]
                              [--copyright_file COPYRIGHT_FILE]
                              [--model_version MODEL_VERSION]
                              [--validation_target RUNTIME_TARGET PROCESSOR_TARGET]
                              [--strict]
                              [--udo_config_paths CUSTOM_OP_CONFIG_PATHS [CUSTOM_OP_CONFIG_PATHS ...]]
snpe-tensorflow-to-dlc: error: unrecognized arguments: --allow_unconsumed_nodes

I am using snpe version 1.55 .

When I remove the --alow_unconsumed_nodes , I get the below error,

snpe-1.55.0.2958$ ./bin/x86_64-linux-clang/snpe-tensorflow-to-dlc --input_network ../mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_frozen.pb --input_dim input "1,224,224,3" --out_node "conv2d_110/BiasAdd" --output_path mobilenet_v1.dlc
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:521: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/vikaash/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
2021-11-10 10:49:47.389194: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-11-10 10:49:47,672 - 209 - ERROR - Conversion FAILED!
Traceback (most recent call last):
  File "./bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 72, in <module>
    main()
  File "./bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 68, in main
    raise e
  File "./bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 51, in main
    custom_op_factory=UDOFactory())
  File "/home/vikaash/HDD/projects/QC/snpe-eval/snpe-1.55.0.2958/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 368, in __init__
    self._ops = self._resolve_graph_operations_from_model(self._model, self.graph)
  File "/home/vikaash/HDD/projects/QC/snpe-eval/snpe-1.55.0.2958/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 651, in _resolve_graph_operations_from_model
    queue = [operations_map[output_op_name]]
KeyError: 'conv2d_110/BiasAdd'

 

Please help me proceed further.

 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.