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
[tflite] enable INT8 for Java binding #36397
Merged
tensorflow-copybara
merged 4 commits into
tensorflow:master
from
freedomtan:enable_int8_for_tflite_java_binding
Feb 13, 2020
Merged
[tflite] enable INT8 for Java binding #36397
tensorflow-copybara
merged 4 commits into
tensorflow:master
from
freedomtan:enable_int8_for_tflite_java_binding
Feb 13, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
some models created by full-integer post training quantization, e.g., the mobilenet v3 edgetpu one [1], have INT8 input and output tensors. [1] https://storage.cloud.google.com/mobilenet_edgetpu/checkpoints/mobilenet_edgetpu_224_1.0.tgz
jdduke
requested changes
Feb 10, 2020
tensorflow/lite/java/src/main/java/org/tensorflow/lite/Tensor.java
Outdated
Show resolved
Hide resolved
jdduke
reviewed
Feb 10, 2020
tensorflow/lite/java/src/main/java/org/tensorflow/lite/Tensor.java
Outdated
Show resolved
Hide resolved
jdduke
reviewed
Feb 11, 2020
if (oType != dtype) { | ||
// INT8 and UINT8 have the same string name, "byte" | ||
if (oType.toStringName().equals(dtype.toStringName())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can you add a test case in DataTypeTest.java to verify this equality? You can basically just copy this exact logic and make sure it holds for int8/uint8.
jdduke
approved these changes
Feb 12, 2020
tensorflow-bot
bot
added
kokoro:force-run
Tests on submitted change
ready to pull
PR ready for merge process
labels
Feb 12, 2020
gbaned
added
ready to pull
PR ready for merge process
and removed
awaiting review
Pull request awaiting review
ready to pull
PR ready for merge process
labels
Feb 13, 2020
tensorflow-copybara
pushed a commit
that referenced
this pull request
Feb 13, 2020
…_binding PiperOrigin-RevId: 294933944 Change-Id: I2e852573e689b081de50f558e66eb914727a5524
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla: yes
comp:lite
TF Lite related issues
ready to pull
PR ready for merge process
size:S
CL Change Size: Small
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
some models created by full-integer post training quantization,
e.g., the mobilenet v3 edgetpu one [1], have INT8 input and
output tensors.
See also tensorflow/models#7887
[1] https://storage.cloud.google.com/mobilenet_edgetpu/checkpoints/mobilenet_edgetpu_224_1.0.tgz