summaryrefslogtreecommitdiff
path: root/tools/nnpackage_tool/tf2tfliteV2/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nnpackage_tool/tf2tfliteV2/README.md')
-rw-r--r--tools/nnpackage_tool/tf2tfliteV2/README.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/tools/nnpackage_tool/tf2tfliteV2/README.md b/tools/nnpackage_tool/tf2tfliteV2/README.md
new file mode 100644
index 000000000..836740a5c
--- /dev/null
+++ b/tools/nnpackage_tool/tf2tfliteV2/README.md
@@ -0,0 +1,47 @@
+# tf2tfliteV2
+
+_tf2tfliteV2_ is a TensorFlow to TensorFlow Lite model Converter.
+
+## Where does V2 come from?
+Even though we alreay have _tf2tflite_, we cannot cover all opeartors in TensorFlow. To expand coverage, we introduce _tf2tfliteV2_ which uses `TensorFlow Lite Converter`(by Google) internally.
+
+## Prerequisite
+- Frozen graph from TensorFlow 1.13.1
+- Desired version of TensorFlow(You can use python virtualenv, docker, etc.)
+
+## Example
+```
+python tf2tfliteV2.py \
+> --v1 \
+> --input_path=frozen_graph.pb \
+> --output_path=converted.tflite \
+> --input_arrays=model_inputs \
+> --output_arrays=model_outputs
+
+```
+```
+python tf2tfliteV2.py \
+> --v2 \
+> --input_path=frozen_graph.pb \
+> --output_path=converted.tflite \
+> --input_arrays=model_inputs \
+> --output_arrays=model_outputs
+```
+
+## optional argument
+```
+ -h, --help show this help message and exit
+ --v1 Use TensorFlow Lite Converter 1.x
+ --v2 Use TensorFlow Lite Converter 2.x
+ --input_path INPUT_PATH
+ Full filepath of the input file.
+ --output_path OUTPUT_PATH
+ Full filepath of the output file.
+ --input_arrays INPUT_ARRAYS
+ Names of the input arrays, comma-separated.
+ --input_shapes INPUT_SHAPES
+ Shapes corresponding to --input_arrays, colon-
+ separated.
+ --output_arrays OUTPUT_ARRAYS
+ Names of the output arrays, comma-separated.
+```