Forums - snpe-tflite-to-dlc in qualcomm neural processing sdk gives error while converting tflite to dlc

4 posts / 0 new
Last post
snpe-tflite-to-dlc in qualcomm neural processing sdk gives error while converting tflite to dlc
atrisaxena2
Join Date: 20 Mar 24
Posts: 2
Posted: Fri, 2024-04-12 01:34

 

 

 

I am trying to convert a tflite model to dlc using snpe-tflite-to-dlc in wsl ubuntu 20.4 using tflite version 2.3.1. installed in python 3.8 virtual environment. i got an error as attached below;

2024-04-12 11:25:29,364 - 230 - ERROR - Encountered Error: int() argument must be a string, a bytes-like object or a number, not 'NoneType' Traceback (most recent call last): File "/mnt/c/Qualcomm/AIStack/SNPE/2.20.0.240223/bin/x86_64-linux-clang/snpe-tflite-to-dlc", line 51, in main converter = TFLiteConverterFrontend(args) File"/mnt/c/Qualcomm/AIStack/SNPE/2.20.0.240223/lib/python/qti/aisw/converters/tflite/tflite_to_ir.py", line 23, in init super(TFLiteConverterFrontend, self).init(args, File "/mnt/c/Qualcomm/AIStack/SNPE/2.20.0.240223/lib/python/qti/aisw/converters/relay/relay_to_ir.py", line 324, in init self.importer.convert_to_relay(self.input_model_path, File "/mnt/c/Qualcomm/AIStack/SNPE/2.20.0.240223/lib/python/qti/aisw/converters/relay/importers/tflite_importer.py", line 115, in convert_to_relay self.mod, self.params = tflite_to_relay.from_tflite(tflite_model, File "/mnt/c/Qualcomm/AIStack/SNPE/2.20.0.240223/lib/python/qti/tvm/relay/frontend/tflite.py", line 4608, in from_tflite tensor = subgraph.Tensors(tensor_idx) File "/home/rosemol_30/PYTHON3.8_VENV_ROOT/lib/python3.8/site-packages/tflite/SubGraph.py", line 26, in Tensors x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

If you have any knowledge , please help me. Thanks in advance.

  • Up0
  • Down0
for_superearth
Join Date: 14 Apr 24
Posts: 1
Posted: Sun, 2024-04-14 20:14

Hello, I also encountered the same problem as you. Have you solved this problem?

  • Up0
  • Down0
atrisaxena2
Join Date: 20 Mar 24
Posts: 2
Posted: Mon, 2024-04-29 03:55

No , Are you able to figure out the solution

  • Up0
  • Down0
sanjjey.a.sanjjey
Join Date: 17 May 22
Posts: 57
Posted: Thu, 2024-05-02 00:11

Hi,

Can you degrade the python version to python3.6 and try it once.

  • 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.