I am working on creating an Android app. I am getting this error “Error occurred when initializing ObjectDetector: Output tensor at index 0 is expected to have 3 dimensions, found 2.” I have tried to search for the error and followed downgrading tensorflow but doesn’t solve the problem. I am attaching the quantized model if anyone can help.
Welcome to the Tensorflow Forum!
Could you please upgrade to the latest version of the Android app example for TensorFlow and let us know?
Thanks for your response. I am currently using this one:
Is there any other latest?
I have tested the example and app runs as intended. Are you customising the app for custom usage and hitting the problem?
Yes, I am doing custom training and I have attached my model with the question.
Unfortunately I don’t have access to your model.
Can you check now? I would appreciate if you can help me, been stuck with this prob for a week.
Can you please let us know the TF version used for TFLite conversion?
There was known issue of change in the order of output tensors which might be the problem in your case.
Please try with TF 2.12 and TF Nightly and let us know if the issue is still persists. If yes, please try the workaround suggested here