From 278bddcee2509df42b807fbacca6647003929e16 Mon Sep 17 00:00:00 2001 From: Nupur Garg Date: Wed, 13 Mar 2019 15:36:43 -0700 Subject: [PATCH] Adds clarity on supported formats for TFLiteConverter 2.0. PiperOrigin-RevId: 238324267 --- .../lite/g3doc/r2/convert/python_api.md | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tensorflow/lite/g3doc/r2/convert/python_api.md b/tensorflow/lite/g3doc/r2/convert/python_api.md index b5ced832960..882346fb8cf 100644 --- a/tensorflow/lite/g3doc/r2/convert/python_api.md +++ b/tensorflow/lite/g3doc/r2/convert/python_api.md @@ -150,7 +150,20 @@ output_data = interpreter.get_tensor(output_details[0]['index']) print(output_data) ``` -## Summary of changes in TFLiteConverter in 1.X and 2.0 +## Summary of changes in `TFLiteConverter` between 1.X and 2.0 + +The following section summarizes the changes in `TFLiteConverter` from 1.X to +2.0. If any of the changes raise concerns, please file a +[GitHub issue](https://github.com/tensorflow/tensorflow/issues). + +### Supported formats + +`TFLiteConverter` in 2.0 supports SavedModels and Keras model files generated in +both 1.X and 2.0. However, the conversion process no longer supports frozen +`GraphDefs` generated in 1.X. Users who want to convert frozen `GraphDefs` to +TensorFlow Lite should use `tensorflow.compat.v1`. + +### Quantization-aware training The following attributes and methods associated with [quantization-aware training](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/quantize) @@ -173,6 +186,8 @@ removed in the 2.0 API until the new quantization API is launched. Users who want to convert models generated by the rewriter function can use `tensorflow.compat.v1`. +### Changes to attributes + The `target_ops` attribute has become an attribute of `TargetSpec` and renamed to `supported_ops` in line with future additions to the optimization framework. @@ -190,15 +205,14 @@ Additionally, the following attributes have been removed: * `dump_graphviz_dir` * `dump_graphviz_video` +### Deprecated APIs + The following methods that were previously deprecated in 1.X will no longer be exported in 2.0: * `lite.toco_convert` * `lite.TocoConverter` -If any of the changes raise concerns, please file a -[GitHub issue](https://github.com/tensorflow/tensorflow/issues). - ## Installing TensorFlow ### Installing the TensorFlow 2.0 nightly