I was tried to import a model with multiple inputs model also I feed with multiple inputs
mod, params = relay.frontend.from_tflite(tflite_model,
shape_dict={input1_tensor:input_shape,input2_tensor: input2_shape,input3_tensor: input3_shape},
dtype_dict={input_tensor: input_dtype,input2_tensor: input2_dtype,input3_tensor: input2_dtype})
but still, I get the following error anyone has ideas,
TypeError: iteration over a 0-d array
I think it does not relate to multiple inputs
. Maybe due to some special ops/shape in your model. You can try to investigate where the error was threw.
> Traceback (most recent call last):
> File "/snap/pycharm-community/197/plugins/python-ce/helpers/pydev/pydevd.py", line 1438, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
> File "/snap/pycharm-community/197/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
> File "/home/Documents/transfer/tvm_from_tflite.py", line 51, in <module>
dtype_dict={input_tensor: input_dtype,hidden_tensor: input_dtype,cell_tensor: input_dtype})
> File "/home/.local/lib/python3.6/site-packages/tvm-0.7.dev1-py3.6-linux-x86_64.egg/tvm/relay/frontend/tflite.py", line 2870, in from_tflite
op_converter.convert_op_to_relay()
> File "/home/.local/lib/python3.6/site-packages/tvm-0.7.dev1-py3.6-linux-x86_64.egg/tvm/relay/frontend/tflite.py", line 190, in convert_op_to_relay
ret = self.convert_map[op_code_str](op)
> File "/home/.local/lib/python3.6/site-packages/tvm-0.7.dev1-py3.6-linux-x86_64.egg/tvm/relay/frontend/tflite.py", line 1540, in convert_reduce_max
return self._convert_reduce(_op.reduce.max, op)
> File "/home/.local/lib/python3.6/site-packages/tvm-0.7.dev1-py3.6-linux-x86_64.egg/tvm/relay/frontend/tflite.py", line 1507, in _convert_reduce
axis = tuple(self.get_tensor_value(input_tensors[1]))
> TypeError: iteration over a 0-d array
Also found some more info i have ReduceMax node in the graph and the error rises at this point