Skip to content

Commit ed9b987

Browse files
authored
add unittest for --tflite command line (#1362)
* add unit test for tflite command line Signed-off-by: Guenther Schmuelling <[email protected]> * add tflite tutorial Signed-off-by: Guenther Schmuelling <[email protected]> * add readme Signed-off-by: Guenther Schmuelling <[email protected]> * fix typo Signed-off-by: Guenther Schmuelling <[email protected]>
1 parent 9a6bb04 commit ed9b987

File tree

4 files changed

+370
-0
lines changed

4 files changed

+370
-0
lines changed
872 Bytes
Binary file not shown.

tests/test_convert.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ def test_convert_graphdef_cut_output(self):
116116
'--output',
117117
'converted_graphdef_cut_output.onnx']))
118118

119+
@check_tf_min_version("2.2")
120+
def test_convert_tflite(self):
121+
""" convert tflite """
122+
self.assertTrue(run_test_case(['',
123+
'--tflite',
124+
'tests/models/regression/tflite/model.tflite',
125+
'--output',
126+
'converted_checkpoint.onnx']))
119127

120128
if __name__ == '__main__':
121129
unittest.main()

tutorials/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--- SPDX-License-Identifier: Apache-2.0 -->
2+
3+
# tf2onnx tutorials
4+
5+
The following tutorials show how to convert various models to ONNX.
6+
7+
[The original Bert model](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/BertTutorial.ipynb)<br/>
8+
By now this model is a bit old and it is much easier to use huggingface. To see how to convert the huggingface tensorflow models see [huggingface.py](https://github.com/onnx/tensorflow-onnx/blob/master/tests/huggingface.py)
9+
10+
11+
[ssd-mobilenet](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/ConvertingSSDMobilenetToONNX.ipynb)
12+
13+
[efficientdet](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/efficientdet.ipynb)
14+
15+
[efficientnet-edge](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/efficientnet-edge.ipynb)
16+
17+
[efficientnet-lite](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/efficientnet-lite.ipynb)
18+
19+
[keras-resnet50](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/keras-resnet50.ipynb), shows how to convert a keras model via python api
20+
21+
[mobiledet](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/mobiledet-tflite.ipynb), shows how to convert a tflite model

tutorials/mobiledet-tflite.ipynb

Lines changed: 341 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)