tf.lite.TocoConverter
Stay organized with collections
Save and categorize content based on your preferences.
Convert a TensorFlow model into output_format
using TOCO.
This class has been deprecated. Please use lite.TFLiteConverter
instead.
Methods
from_frozen_graph
View source
@classmethod
from_frozen_graph(
graph_def_file, input_arrays, output_arrays, input_shapes=None
)
Creates a TocoConverter class from a file containing a frozen graph. (deprecated)
from_keras_model_file
View source
@classmethod
from_keras_model_file(
model_file, input_arrays=None, input_shapes=None, output_arrays=None
)
Creates a TocoConverter class from a tf.keras model file. (deprecated)
from_saved_model
View source
@classmethod
from_saved_model(
saved_model_dir, input_arrays=None, input_shapes=None, output_arrays=None,
tag_set=None, signature_key=None
)
Creates a TocoConverter class from a SavedModel. (deprecated)
from_session
View source
@classmethod
from_session(
sess, input_tensors, output_tensors
)
Creates a TocoConverter class from a TensorFlow Session. (deprecated)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.lite.TocoConverter\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1038-L1088) |\n\nConvert a TensorFlow model into `output_format` using TOCO.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.lite.TocoConverter`](/api_docs/python/tf/compat/v1/lite/TocoConverter)\n\n\u003cbr /\u003e\n\nThis class has been deprecated. Please use [`lite.TFLiteConverter`](../../tf/lite/TFLiteConverter) instead.\n\nMethods\n-------\n\n### `from_frozen_graph`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1051-L1061) \n\n @classmethod\n from_frozen_graph(\n graph_def_file, input_arrays, output_arrays, input_shapes=None\n )\n\nCreates a TocoConverter class from a file containing a frozen graph. (deprecated)\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_frozen_graph`](../../tf/lite/TFLiteConverter#from_frozen_graph) instead.\n\n### `from_keras_model_file`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1078-L1088) \n\n @classmethod\n from_keras_model_file(\n model_file, input_arrays=None, input_shapes=None, output_arrays=None\n )\n\nCreates a TocoConverter class from a tf.keras model file. (deprecated)\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_keras_model_file`](../../tf/lite/TFLiteConverter#from_keras_model_file) instead.\n\n### `from_saved_model`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1063-L1076) \n\n @classmethod\n from_saved_model(\n saved_model_dir, input_arrays=None, input_shapes=None, output_arrays=None,\n tag_set=None, signature_key=None\n )\n\nCreates a TocoConverter class from a SavedModel. (deprecated)\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_saved_model`](../../tf/lite/TFLiteConverter#from_saved_model) instead.\n\n### `from_session`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1044-L1049) \n\n @classmethod\n from_session(\n sess, input_tensors, output_tensors\n )\n\nCreates a TocoConverter class from a TensorFlow Session. (deprecated)\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_session`](../../tf/lite/TFLiteConverter#from_session) instead."]]