-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
java.lang.IllegalArgumentException: Cannot copy to a TensorFlowLite tensor (serving_default_input_1:0) with 4915200 bytes from a Java Buffer with 1228800 bytes #57
Comments
@hanspres1999 it seems like there's a mismatch between the input tensor size and the buffer size. Ensure your model's input dimensions match the expected input size in the app. Double-check the model's input shape and adjust the |
exactly same error with do I must use |
@dingniaoji it seems like a tensor size mismatch. Ensure your input dimensions match the model's expected size. Try using |
after a source code debugging, I finally solve the problem. just to make sure that the I tried |
@hanspres1999 in your case, it seems that in the make the the size same may solve your problem. |
@ice6 I've kept my imgsz in metadata as 640 x 640. It still throws the same error. If it helps, the model was developed with the YOLOv5s backend. |
I have never tried yolov5, I think it should be fine, because the underlying is tensorflow-lite. use paste the content of |
Please inspect your model using Netron to verify the input dimensions. Share the |
Search for this and rename it to the size of the model you used
|
Ensure the |
I am running my custom trained YOLO5 model on the example app and end up with the error:
I've changed the imgsz parameter on the metadata.yaml file to 640, 640 (and tried keeping it at 320,320) and yet no difference.
The text was updated successfully, but these errors were encountered: