----> 1 converter = tf.lite.TFLiteConverter.from_keras_model(model)AttributeError: type object 'TFLiteConverterV2' has no attribute 'from_keras_model'
TensorFlow Lite version | TFLite 1.13 | TFLite 2.0 |
Class | TFLiteConverter | TFLiteConverterV2 |
Converter methods | 4 Methods # Converting a GraphDef from session. from_session(sess, in_tensors, out_tensors)
# Converting a GraphDef from file. from_frozen_graph(graph_def_file, input_arrays, output_arrays)
# Converting a SavedModel. from_saved_model(saved_model_dir)
# Converting a tf.keras model from_keras_model_file(keras_model) | 2 methods: # creates a TFLiteConverter class from a ConcreteFunction from_concrete_function(cls, func)
#Converts a TensorFlow GraphDef based on instance variables convert(self):
|
Source code | ||
API doc | ||
Guide on tensorflow.org | Convert a model/Python API (link) | Convert a TF 2.0 Model/Generate a concrete function (link) |
--
You received this message because you are subscribed to the Google Groups "TensorFlow Community Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testing+u...@tensorflow.org.
The 2.0 TFLiteConverter API has been updated since alpha release. `TFLiteConverter.from_keras_model` is available in the `tf-nightly-2.0-preview`. Documentation on the API is available here: https://www.tensorflow.org/lite/r2/convert/python_api.Additionally, documentation on concrete functions is available here: https://www.tensorflow.org/lite/r2/convert/concrete_function.Hope this helps!Best,Nupur
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tflite+un...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tflite/.
Hi Margaret,Thanks for the feedback. I will add a note to at the top of the "Converter Python API guide" about the 2.0 alpha differing from the nightly.When using from_keras_model you do not need to worry about generating a concrete function. The only caveat is when you want to convert only a subset of the model. In 2.0, the only way to convert a portion of the model currently is to wrap only the part of the model you want to convert in a tf.function and convert that function.
Best,Nupur
To unsubscribe from this group and stop receiving emails from it, send an email to tes...@tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfl...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tflite/.
--
You received this message because you are subscribed to the Google Groups "TensorFlow Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfl...@tensorflow.org.