Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
eea69e20
Commit
eea69e20
authored
Oct 20, 2020
by
Taehee Jeong
Committed by
TF Object Detection Team
Oct 20, 2020
Browse files
fix formatting of `running_on_mobile_tf2.md`
PiperOrigin-RevId: 338066485
parent
7beddae1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
research/object_detection/g3doc/running_on_mobile_tf2.md
research/object_detection/g3doc/running_on_mobile_tf2.md
+7
-4
No files found.
research/object_detection/g3doc/running_on_mobile_tf2.md
View file @
eea69e20
...
...
@@ -79,7 +79,7 @@ API*. Be sure to use a
[
representative dataset
](
https://www.tensorflow.org/lite/performance/post_training_quantization#full_integer_quantization
)
and set the following options on the converter:
```
```
python
converter
.
optimizations
=
[
tf
.
lite
.
Optimize
.
DEFAULT
]
converter
.
target_spec
.
supported_ops
=
[
tf
.
lite
.
OpsSet
.
TFLITE_BUILTINS_INT8
,
tf
.
lite
.
OpsSet
.
TFLITE_BUILTINS
]
...
...
@@ -115,8 +115,11 @@ directory.
We will now edit the gradle build file to use these assets. First, open the
`build.gradle`
file
`$TF_EXAMPLES/lite/examples/object_detection/android/app/build.gradle`
. Comment
out the model download script to avoid your assets being overwritten:
`// apply
from:'download_model.gradle'`
```
out the model download script to avoid your assets being overwritten:
```
shell
// apply from:
'download_model.gradle'
```
If your model is named
`detect.tflite`
, and your labels file
`labelmap.txt`
, the
example will use them automatically as long as they've been properly copied into
...
...
@@ -130,7 +133,7 @@ your model is floating point, the flag TF_OD_API_IS_QUANTIZED is set to false.
This new section of DetectorActivity.java should now look as follows for a
quantized model:
```
shell
```
java
private
static
final
boolean
TF_OD_API_IS_QUANTIZED
=
true
;
private
static
final
String
TF_OD_API_MODEL_FILE
=
"detect.tflite"
;
private
static
final
String
TF_OD_API_LABELS_FILE
=
"labels_list.txt"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment