-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cannot copy between a TensorFlowLite tensor with shape [1, 2535, 4] and a Java object with shape [1, 10647, 4]. #301
Comments
change variable OUTPUT_WIDTH_FULL |
Thanks for your reply!! |
For current android demo's configuration, the "isTiny" should be true, otherwise, it will prompt error like issue hunglc007#301
When I tried to build project and Install on my android phone, I have encountered problem, the log as below:
2021-01-22 18:58:26.093 18112-18343/org.tensorflow.lite.examples.detection E/AndroidRuntime: FATAL EXCEPTION: Thread-2
Process: org.tensorflow.lite.examples.detection, PID: 18112
java.lang.IllegalArgumentException: Cannot copy between a TensorFlowLite tensor with shape [1, 2535, 4] and a Java object with shape [1, 10647, 4].
at org.tensorflow.lite.Tensor.throwIfShapeIsIncompatible(Tensor.java:412)
at org.tensorflow.lite.Tensor.throwIfDataIsIncompatible(Tensor.java:369)
at org.tensorflow.lite.Tensor.copyTo(Tensor.java:247)
at org.tensorflow.lite.NativeInterpreterWrapper.run(NativeInterpreterWrapper.java:166)
at org.tensorflow.lite.Interpreter.runForMultipleInputsOutputs(Interpreter.java:314)
at org.tensorflow.lite.examples.detection.tflite.YoloV4Classifier.getDetectionsForFull(YoloV4Classifier.java:392)
at org.tensorflow.lite.examples.detection.tflite.YoloV4Classifier.recognizeImage(YoloV4Classifier.java:544)
at org.tensorflow.lite.examples.detection.tflite.YoloV4Classifier.recognizeImage(YoloV4Classifier.java:61)
at org.tensorflow.lite.examples.detection.MainActivity.lambda$null$1$MainActivity(MainActivity.java:52)
at org.tensorflow.lite.examples.detection.-$$Lambda$MainActivity$OxNL7NrV0ct8jl4zEsUXaD27RnY.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:923)
Any idea?
The text was updated successfully, but these errors were encountered: