MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / from_keras_model

Method from_keras_model

tensorflow/lite/python/lite.py:373–384  ·  view source on GitHub ↗

Creates a TFLiteConverter object from a Keras model. Args: model: tf.Keras.Model Returns: TFLiteConverter object.

(cls, model)

Source from the content-addressed store, hash-verified

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.

Callers 5

_convert_tf2_modelFunction · 0.80
testSequentialModelMethod · 0.80
testGraphDebugInfoMethod · 0.80
test_keras_model_v2Function · 0.80

Calls 1

get_concrete_functionMethod · 0.45

Tested by 4

testSequentialModelMethod · 0.64
testGraphDebugInfoMethod · 0.64
test_keras_model_v2Function · 0.64