Skip to content

[source]

convert_keras_model function

larq_compute_engine.convert_keras_model(model)

Converts a Keras model to TFLite flatbuffer.

Example

tflite_model = convert_keras_model(model)
with open("/tmp/my_model.tflite", "wb") as f:
    f.write(tflite_model)

Argument

Arguments

model: A tf.keras.Model to convert.

Return

Returns

The converted data in serialized format.