tf.compat.v1.lite.toco_convert
Convert a model using TOCO. (deprecated)
tf.compat.v1.lite.toco_convert(
input_data, input_tensors, output_tensors, *args, **kwargs
)
Typically this function is used to convert from TensorFlow GraphDef to TFLite. Conversion can be customized by providing arguments that are forwarded to build_toco_convert_protos (see documentation for details). This function has been deprecated. Please use lite.TFLiteConverter instead.
| Args | |
|---|---|
input_data | Input data (i.e. often sess.graph_def), |
input_tensors | List of input tensors. Type and shape are computed using foo.shape and foo.dtype. |
output_tensors | List of output tensors (only .name is used from this). |
*args | See build_toco_convert_protos, |
**kwargs | See build_toco_convert_protos. |
| Returns | |
|---|---|
| The converted data. For example if TFLite was the destination, then this will be a tflite flatbuffer in a bytes array. |
| Raises | |
|---|---|
Defined in build_toco_convert_protos. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/compat/v1/lite/toco_convert