abhilb
July 22, 2021, 9:13am
1
I compiled a tflite model using tvmc and when I run the model I get the following error.
Error: the input tensor 'data' is not in the graph. Expected inputs: 'dict_keys(['input'])'
Could someone please guide me to how to debug this problem.
EDIT :
Target is Raspberry Pi4
I compiled the facedetection tflite model from media pipe.
tvmc compile --target "llvm -mtriple=arm-linux-gnueabihf" --output "model.tar" models/face_detection_full_range.tflite
Then preprocessed the input image into a numpy array as described in the documentation and then used that for inference.
tvmc run --inputs face.npz --outputs preds.npz model.tar
1 Like
Hi @abhilb , can you provide a bit more detail on the command lines you ran, and perhaps a bit more about the model you are using?
Based on the message, is that possible that your model is expecting an input called input
, and you are exporting your .npz
input file with an input called data
?
In the sample input pre-processing script, this is set in the very last line:
np.savez("imagenet_cat", data=img_data)
^^^^
Can you try replacing that data=
with input=
, so that it matches with your model?
I can try to debug this further if needed. Let me know.
4 Likes
abhilb
July 23, 2021, 6:56am
5
@leandron That was it. I never thought about it. I thought I was doing something wrong in the compilation step. Thanks a lot.
1 Like