Minor fixes to TFLite documentation.

PiperOrigin-RevId: 224192479
This commit is contained in:
Nupur Garg 2018-12-05 11:39:28 -08:00 committed by TensorFlower Gardener
parent 2fd76cbef3
commit 0ed0aecc5c
2 changed files with 7 additions and 7 deletions
tensorflow/lite

View File

@ -19,9 +19,9 @@ be targeted to devices with mobile.
## API
The API for converting TensorFlow models to TensorFlow Lite as of TensorFlow 1.9
is `tf.lite.TFLiteConverter`. The API for calling the Python intepreter
is `tf.lite.Interpreter`.
The API for converting TensorFlow models to TensorFlow Lite is
`tf.lite.TFLiteConverter`. The API for calling the Python interpreter is
`tf.lite.Interpreter`.
`TFLiteConverter` provides class methods based on the original format of the
model. `TFLiteConverter.from_session()` is available for GraphDefs.

View File

@ -235,9 +235,9 @@
"id": "AT8BgkKmljOy"
},
"source": [
"Using the python `TocoConverter`, the saved model can be converted into a TFLite model.\n",
"Using the python `TFLiteConverter`, the saved model can be converted into a TFLite model.\n",
"\n",
"First load the model using the `TocoConverter`:"
"First load the model using the `TFLiteConverter`:"
]
},
{
@ -252,7 +252,7 @@
"source": [
"import tensorflow as tf\n",
"tf.enable_eager_execution()\n",
"converter = tf.lite.TocoConverter.from_saved_model(saved_model_dir)\n",
"converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)\n",
"tflite_model = converter.convert()"
]
},
@ -648,7 +648,7 @@
"graph_def_file = pathlib.Path(archive_path).parent/\"resnet_v2_101_299_frozen.pb\"\n",
"input_arrays = [\"input\"] \n",
"output_arrays = [\"output\"]\n",
"converter = tf.lite.TocoConverter.from_frozen_graph(\n",
"converter = tf.lite.TFLiteConverter.from_frozen_graph(\n",
" str(graph_def_file), input_arrays, output_arrays, input_shapes={\"input\":[1,299,299,3]})\n",
"converter.post_training_quantize = True\n",
"resnet_tflite_file = graph_def_file.parent/\"resnet_v2_101_quantized.tflite\"\n",