'Converting TFRS to the tflite model

I am new to Tensorflow and I need to convert the TFRS to the tflite model. Does anyone have any idea or experience related to this topic?

I simply ran the retrieval code by Colab. And added the recommended method to convert the final model to tflite. That was:

converter = tf.lite.TFLiteConverter.from_saved_model(path) # path to the SavedModel directory tflite_model = converter.convert()

You can see the error in the following image.

enter image description here



Solution 1:[1]

Try downloading the latest tf-nightly pip and then convert this model using new MLIR converter. You can enable the new converter by setting:

converter.experimental_new_converter = True

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ahmet hamza emra