I follow the tutorial: Compile TFLite Models, and get error AttributeError: 'SubGraph' object has no attribute 'InputsAsNumpy'
- Python: 3.6.7 (anaconda)
- flatc: 1.7.0
- tflite:
wget https://raw.githubusercontent.com/tensorflow/tensorflow/r1.12/tensorflow/contrib/lite/schema/schema.fb flatc --python schema.fbs
(I have also tried tensorflow r1.13)
I check the source code of tflite generated by flatc, there is no InputsAsNumpy
in SubGraph.py
.
from tvm import relay
func, params = relay.frontend.from_tflite(tflite_model,
shape_dict={input_tensor: input_shape},
dtype_dict={input_tensor: input_dtype})
The error is
File "xxxx/tvm/tvm/python/tvm/relay/frontend/tflite.py", line 609, in from_tflite
model_inputs = subgraph.InputsAsNumpy()
I think the tutorial is definitely right, but I can’t find where I make a mistake……