3 _tf2tfliteV2_ is a TensorFlow to TensorFlow Lite model Converter.
5 ## Where does V2 come from?
6 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.
9 - Frozen graph from TensorFlow 1.13.1
10 - Desired version of TensorFlow(You can use python virtualenv, docker, etc.)
14 python tf2tfliteV2.py \
16 > --input_path=frozen_graph.pb \
17 > --output_path=converted.tflite \
18 > --input_arrays=model_inputs \
19 > --output_arrays=model_outputs
23 python tf2tfliteV2.py \
25 > --input_path=frozen_graph.pb \
26 > --output_path=converted.tflite \
27 > --input_arrays=model_inputs \
28 > --output_arrays=model_outputs
33 -h, --help show this help message and exit
34 --v1 Use TensorFlow Lite Converter 1.x
35 --v2 Use TensorFlow Lite Converter 2.x
36 --input_path INPUT_PATH
37 Full filepath of the input file.
38 --output_path OUTPUT_PATH
39 Full filepath of the output file.
40 --input_arrays INPUT_ARRAYS
41 Names of the input arrays, comma-separated.
42 --input_shapes INPUT_SHAPES
43 Shapes corresponding to --input_arrays, colon-
45 --output_arrays OUTPUT_ARRAYS
46 Names of the output arrays, comma-separated.