diff options
author | Nupur Garg <nupurgarg@google.com> | 2018-08-31 09:01:43 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-31 09:05:12 -0700 |
commit | 30ebb9b712b2008525944deb47dee8b653f522a3 (patch) | |
tree | 019282d484d5a9dcf68aefed8a66bc76071bf538 /tensorflow/contrib/lite/toco | |
parent | fe01657f67220fc4e4708e579077157e8f525fc1 (diff) |
Documentation fixes.
PiperOrigin-RevId: 211092680
Diffstat (limited to 'tensorflow/contrib/lite/toco')
4 files changed, 14 insertions, 13 deletions
diff --git a/tensorflow/contrib/lite/toco/g3doc/cmdline_examples.md b/tensorflow/contrib/lite/toco/g3doc/cmdline_examples.md index 4bf47aa3c4..84680b968e 100644 --- a/tensorflow/contrib/lite/toco/g3doc/cmdline_examples.md +++ b/tensorflow/contrib/lite/toco/g3doc/cmdline_examples.md @@ -24,8 +24,8 @@ Table of contents: * [Multiple output arrays](#multiple-output-arrays) * [Specifying subgraphs](#specifying-subgraphs) * [Graph visualizations](#graph-visualizations) - * [Using --output_format=GRAPHVIZ_DOT](#using-output-formatgraphviz-dot) - * [Using --dump_graphviz](#using-dump-graphviz) + * [Using --output_format=GRAPHVIZ_DOT](#using-output-format-graphviz-dot) + * [Using --dump_graphviz_dir](#using-dump-graphviz-dir) * [Graph "video" logging](#graph-video-logging) * [Legend for the graph visualizations](#graphviz-legend) @@ -247,17 +247,17 @@ function tends to get fused). ## Graph visualizations -TOCO can export a graph to the GraphViz Dot format for easy visualization via +TOCO can export a graph to the Graphviz Dot format for easy visualization via either the `--output_format` flag or the `--dump_graphviz_dir` flag. The subsections below outline the use cases for each. -### Using `--output_format=GRAPHVIZ_DOT` +### Using `--output_format=GRAPHVIZ_DOT` <a name="using-output-format-graphviz-dot"></a> -The first way to get a graphviz rendering is to pass `GRAPHVIZ_DOT` into +The first way to get a Graphviz rendering is to pass `GRAPHVIZ_DOT` into `--output_format`. This results in a plausible visualization of the graph. This -reduces the requirements that exist during conversion between other input and -output formats. This may be useful if conversion from TENSORFLOW_GRAPHDEF to -TFLITE is failing. +reduces the requirements that exist during conversion from a TensorFlow GraphDef +to a TensorFlow Lite FlatBuffer. This may be useful if the conversion to TFLite +is failing. ``` curl https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_0.50_128_frozen.tgz \ @@ -287,10 +287,10 @@ google-chrome /tmp/foo.dot.pdf Example PDF files are viewable online in the next section. -### Using `--dump_graphviz` +### Using `--dump_graphviz_dir` -The second way to get a graphviz rendering is to pass the `--dump_graphviz_dir` -flag, specifying a destination directory to dump GraphViz rendering to. Unlike +The second way to get a Graphviz rendering is to pass the `--dump_graphviz_dir` +flag, specifying a destination directory to dump Graphviz rendering to. Unlike the previous approach, this one retains the original output format. This provides a visualization of the actual graph resulting from a specific conversion process. diff --git a/tensorflow/contrib/lite/toco/g3doc/cmdline_reference.md b/tensorflow/contrib/lite/toco/g3doc/cmdline_reference.md index 76862970c8..1de32f9977 100644 --- a/tensorflow/contrib/lite/toco/g3doc/cmdline_reference.md +++ b/tensorflow/contrib/lite/toco/g3doc/cmdline_reference.md @@ -38,7 +38,7 @@ files. The flag `--output_file` is always required. Additionally, either of TFLite specific transformations. Therefore, the resulting visualization may not reflect the final set of graph transformations. To get a final visualization with all graph - transformations use `--dump_graphviz` instead. + transformations use `--dump_graphviz_dir` instead. The following flags specify optional parameters when using SavedModels. diff --git a/tensorflow/contrib/lite/toco/g3doc/python_api.md b/tensorflow/contrib/lite/toco/g3doc/python_api.md index 3799eac0a1..51f808d4f0 100644 --- a/tensorflow/contrib/lite/toco/g3doc/python_api.md +++ b/tensorflow/contrib/lite/toco/g3doc/python_api.md @@ -70,6 +70,7 @@ val = img + var out = tf.identity(val, name="out") with tf.Session() as sess: + sess.run(tf.global_variables_initializer()) converter = tf.contrib.lite.TocoConverter.from_session(sess, [img], [out]) tflite_model = converter.convert() open("converted_model.tflite", "wb").write(tflite_model) diff --git a/tensorflow/contrib/lite/toco/tflite/export.cc b/tensorflow/contrib/lite/toco/tflite/export.cc index a27d00eb77..c79469f59b 100644 --- a/tensorflow/contrib/lite/toco/tflite/export.cc +++ b/tensorflow/contrib/lite/toco/tflite/export.cc @@ -376,7 +376,7 @@ void Export( "the standard TensorFlow Lite runtime. If you have a custom " "implementation for them you can disable this error with " "--allow_custom_ops, or by setting allow_custom_ops=True " - "when calling tf.contrib.lite.toco_convert(). Here is a list " + "when calling tf.contrib.lite.TocoConverter(). Here is a list " "of operators for which you will need custom implementations: " << absl::StrJoin(error_summary_final, ", ") << "."; } |