Cannot convert model to tflite
Hi @mdomaradzki-cosmose ,
Sorry for the delay, @LakshmiKalaKadali  the issue Was able to reproduce the issue on Colab using TF v2.15 , 2.16 , and TF-nightly ,Please find the [gist](https://colab.sandbox.google.com/gist/Venkat6871/ac03e60bbd0a1d868f77a7a8b34f819c/65529_2-15-2-16-v.ipynb) here for reference.

Thank you! Thanks for your response Hi @mdomaradzki-cosmose,

The error is due to Keras 3. As a workaround install Keras 2 as follows. 
``` 
    pip install -U tf_keras # Keras 2
    import os
    os.environ["TF_USE_LEGACY_KERAS"] = "1" 
```

Here is the [gist](https://colab.sandbox.google.com/gist/LakshmiKalaKadali/c08717846629c71a93eb6b3d7f6be640/tflite_65529_2-16_conversion-issue.ipynb#scrollTo=bzHILp1jNTUo)  with TF 2.16 and keras2 workaround. The TFLite model is successfully converted.

Thank You Thank you, It works!
 Hi @mdomaradzki-cosmose,

Glad to know, the issue is resolved. Please feel free to close the issue.

Thank You
### 1. System information

- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 22.04
- TensorFlow installation (pip package or built from source): pip
- TensorFlow library (version, if pip package or github SHA, if built from source):  2.16.1

### 2. Code
```
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
import tensorflow as tf

x, y = make_classification(random_state=42)
train_x, test_x, train_y, test_y = train_test_split(x, y, test_size=0.2, stratify=y)
print(train_x.shape, test_x.shape, train_y.shape, test_y.shape)

model = tf.keras.models.Sequential([
    tf.keras.Input(shape=(20,)),
    tf.keras.layers.Dense(units=2, activation='softmax')
])

model.compile(optimizer=tf.keras.optimizers.SGD(), loss=tf.keras.losses.SparseCategoricalCrossentropy(), metrics=['accuracy'])
model.fit(x=train_x, y=train_y, epochs=50)
model.evaluate(test_x, test_y)
model.save("model.h5")

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

with open('model.tflite', 'wb') as f:
  f.write(tflite_model)
```

### 3. Failure after conversion
If the conversion is successful, but the generated model is wrong, then state what is wrong:

I tried to convert the model to tflite using two options. Using the above code and from terminal. 
When I do this from code I get 'INFO:tensorflow:Assets written to: /tmp/tmph7onx9_d/assets' and then the code never ends (at least during two hours it didn't finish).
When I try to do this from terminal it crushes with following message:
```
Traceback (most recent call last):
  File "/home/xxx/miniconda3/envs/exp/bin/tflite_convert", line 8, in <module>
    sys.exit(main())
  File "/home/xxx/miniconda3/envs/exp/lib/python3.10/site-packages/tensorflow/lite/python/tflite_convert.py", line 692, in main
    app.run(main=run_main, argv=sys.argv[:1])
  File "/home/xxx/miniconda3/envs/exp/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/xxx/miniconda3/envs/exp/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/home/xxx/miniconda3/envs/exp/lib/python3.10/site-packages/tensorflow/lite/python/tflite_convert.py", line 675, in run_main
    _convert_tf2_model(tflite_flags)
  File "/home/xxx/miniconda3/envs/exp/lib/python3.10/site-packages/tensorflow/lite/python/tflite_convert.py", line 281, in _convert_tf2_model
    model = keras_deps.get_load_model_function()(flags.keras_model_file)
TypeError: 'NoneType' object is not callable

```

### 4. (optional) RNN conversion support
If converting TF RNN to TFLite fused RNN ops, please prefix [RNN] in the title.

### 5. (optional) Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
