# tf.lite.TocoConverter

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1038-L1088) |

Convert a TensorFlow model into `output_format` using TOCO.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.lite.TocoConverter`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/lite/TocoConverter)

<br />

This class has been deprecated. Please use [`lite.TFLiteConverter`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/lite/TFLiteConverter) instead.

## Methods

### `from_frozen_graph`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1051-L1061)

    @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)

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_frozen_graph`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/lite/TFLiteConverter#from_frozen_graph) instead.

### `from_keras_model_file`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1078-L1088)

    @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)

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_keras_model_file`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/lite/TFLiteConverter#from_keras_model_file) instead.

### `from_saved_model`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1063-L1076)

    @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)

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_saved_model`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/lite/TFLiteConverter#from_saved_model) instead.

### `from_session`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/lite/python/lite.py#L1044-L1049)

    @classmethod
    from_session(
        sess, input_tensors, output_tensors
    )

Creates a TocoConverter class from a TensorFlow Session. (deprecated)

> [!WARNING]
> **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`lite.TFLiteConverter.from_session`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/lite/TFLiteConverter#from_session) instead.