Problems of tflite conversion，about the file of tflite(.h5 to .tflite)
@panhu,
Could you please provide the complete code  to reproduce the issue and also the error log which helps us to debug the issue in the effective way. Thank you! The code:

converter = tf.lite.TFLiteConverter.from_keras_model(model)

converter.optimizations = [tf.lite.Optimize.DEFAULT]
def representative_dataset_gen():
...

yield [inp_data]
converter.representative_dataset = representative_dataset_gen

converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8,tf.lite.OpsSet.SELECT_TF_OPS,tf.lite.OpsSet.TFLITE_BUILTINS]

converter.inference_input_type = tf.int8
converter.inference_output_type = tf.int8

tflite_model = converter.convert()

with tf.io.gfile.GFile('denoise_quante1.tflite','wb') as f:
f.write(tflite_model)

##
In the model my GRU(....,unroll=True)
 Hi @panhu 

Sorry for the delayed response.

Using `unroll=True` tends to be more memory-intensive and it is only suitable for short sequences. 

Have you tried converting the model without using select ops and can you mention the size of .h5 when `unroll=True` is used. Also, can you please check in TF 2.11 and TF Nightly and share your observation.

Thanks. This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59921">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59921">No</a>

Hi:
### 1. System information

- Linux
- pip:
- TensorFlow 2.10

### 2. Code
###    My Model part ###
...
gru = GRU(64,activation='tanh', recurrent_activation='sigmoid', return_sequences=True,unroll=True)(tmp)

gru_1 = GRU(128,activation='tanh', recurrent_activation='sigmoid', return_sequences=True,unroll=True)(vad_gru)
...
##Converter###

converter = tf.lite.TFLiteConverter.from_keras_model(model)

converter.optimizations = [tf.lite.Optimize.DEFAULT]
def representative_dataset_gen():
    ...

    yield [inp_data]

converter.representative_dataset = representative_dataset_gen

converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8,tf.lite.OpsSet.SELECT_TF_OPS,tf.lite.OpsSet.TFLITE_BUILTINS]

converter.inference_input_type = tf.int8
converter.inference_output_type = tf.int8

tflite_model = converter.convert()

with tf.io.gfile.GFile('denoise_quante1.tflite','wb') as f:
    f.write(tflite_model)

### 3. Question

When I convert. h5 to. tflite, if my unroll=False in the GRU layer of the model, the converted tflite (300K) file is much smaller than the. h5 (3M) file, but when I use unroll=True, the tflite (39M) file will become large. Why? Is there any solution？

Thanks！