Skip to content
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 convert between a TensorFlowLite buffer with 786432 bytes and a ByteBuffer with 196608 bytes. #6

Open
TSKoduru opened this issue Mar 21, 2021 · 0 comments

Comments

@TSKoduru
Copy link

I created a new TFlite model using another dataset that I had, but after replacing all the necessary files with the right ones (JSON, manifest, model.tflite, etc), I tried to run the app and ran into a problem. "Cannot convert between a TensorFlowLite buffer with 786432 bytes and a ByteBuffer with 196608 bytes." I've managed to figure out that this error is being caused by incorrect use of ByteBuffer (Since you need 4 bytes for a float, and the tflite model uses floats, you actually need 19660 * 4 = 786432 byes). More information can be found on this thread: amitshekhariitbhu/Android-TensorFlow-Lite-Example#6.

How exactly would I go about resolving this issue? Any help would be appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant