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.
Hello, I also encountered the same problem as you. Have you solved this problem?
No , Are you able to figure out the solution
Hi,
Can you degrade the python version to python3.6 and try it once.