Model accuracy reduction in .tflite modelw

I’m currently developing some model optimization using TensorFlow by trying different features (quantization, weight pruning…) in some of my company models.
My problem comes when I convert an h5 model to .tflite without any type of special optimization with the following code:

converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
with open('model.tflite', 'wb') as f:
    f.write(tflite_model)

The model (MobileNet v2) size went from 18.5 MB to 8.9 MB and accuracy from 99.48% to 98.51%
I can’t explain this change that is also happening in other models, for example, this ResNet50:
94.9MB to 94MB and 98.51% to 94.51%.

Why is the conversion to .tflite reducing weight and accuracy without any type of extra optimization?

Hi @Patrick_Kohn,

The ops used in your model can impact the process of converting a TensorFlow model to TensorFlow Lite format. The TensorFlow Lite converter supports a limited number of TensorFlow operations used in common inference models, which means that not every model is directly convertible. This might be the reason for accuracy drop and sometimes tf and tflite execution back ends also effects the accuracy. Please let us know on which environment you are trying to do ? Please share the toy tflite model so that we can closely inspect the model for accuracy drop. Please check the list of compatible ops.

Thank You