tf.contrib.lite.toco_convert_protos

tf.contrib.lite.toco_convert_protos(
    model_flags_str,
    toco_flags_str,
    input_data_str
)

Defined in tensorflow/contrib/lite/python/convert.py.

Convert input_data_str according to model and toco parameters.

Unless you know what you are doing consider using the more friendly tf.contrib.lite.toco_convert}.

Args:

  • model_flags_str: Serialized proto describing model properties, see toco/model_flags.proto.
  • toco_flags_str: Serialized proto describing conversion properties, see toco/toco_flags.proto.
  • input_data_str: Input data in serialized form (e.g. a graphdef is common)

Returns:

Converted model in serialized form (e.g. a TFLITE model is common).

Raises:

  • RuntimeError: When conversion fails, an exception is raised with the error message embedded.