-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid input data #133
Comments
When I check the code inputTensors = getInputTensors(); void setTo(Object src) { |
I am having the same issue with my Mobilenet classifier. @quochuynh67, have you managed to solve this somehow please? |
hi |
I have the same issue. I found that the
it does not produce the error anymore but merely the return code Let me know if I shall provide my code + image. EDIT: I want to mention that I applied the changes from #101 (comment) in my flutter project. EDIT2: I have just seen that the signature of the
The typedef defines the inputData as
here. This change does for one resolve the runtime error but still returns @am15h If you want me to submit a PR to patch all EDIT3: Obviously, the check at https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/c/c_api.cc#L215 fails and using EDIT4: Apparently, I need to convert my image to grayscale first... 😅 |
For anyone struggling with this issue; see my previous post on how to debug the mismatch leading to the The grayscale conversion of the image package did not work in this case. |
Hi, I am using posenet_mobilenet_v1_100_257x257_multi_kpt_stripped.tflit. but I don't know the input data size. The console log here
E/tflite (27994): tensorflow/lite/kernels/conv.cc:316 input->dims->size != 4 (1 != 4)
E/tflite (27994): Node number 0 (CONV_2D) failed to prepare.
E/flutter (27994): [ERROR:flutter/runtime/dart_isolate.cc(1137)] Unhandled exception:
E/flutter (27994): Bad state: failed precondition
E/flutter (27994): #0 checkState (package:quiver/check.dart:74:5)
E/flutter (27994): #1 Interpreter.allocateTensors (package:tflite_flutter/src/interpreter.dart:142:5)
E/flutter (27994): #2 Interpreter.runForMultipleInputs (package:tflite_flutter/src/interpreter.dart:180:7)
E/flutter (27994): #3 Interpreter.run (package:tflite_flutter/src/interpreter.dart:157:5)
E/flutter (27994): #4 Classifier.predict (package:flutter_pose_dance/classifier.dart:108:19)
E/flutter (27994): #5 IsolateUtils.entryPoint (package:flutter_pose_dance/isolate_utils.dart:46:52)
E/flutter (27994):
Could you recommend for me the document or the way to fix it? Thank you so much!
The text was updated successfully, but these errors were encountered: