Creates a TFLiteConverter object from a Keras model. Args: model: tf.Keras.Model Returns: TFLiteConverter object.
(cls, model)
| 371 | |
| 372 | @classmethod |
| 373 | def from_keras_model(cls, model): |
| 374 | """Creates a TFLiteConverter object from a Keras model. |
| 375 | |
| 376 | Args: |
| 377 | model: tf.Keras.Model |
| 378 | |
| 379 | Returns: |
| 380 | TFLiteConverter object. |
| 381 | """ |
| 382 | func = _saving_utils.trace_model_call(model) |
| 383 | concrete_func = func.get_concrete_function() |
| 384 | return cls([concrete_func]) |
| 385 | |
| 386 | def convert(self): |
| 387 | """Converts a TensorFlow GraphDef based on instance variables. |