ImportError: `keras.optimizers.legacy` is not supported in Keras 3. When using `tf.keras`, to continue using a `tf.keras.optimizers.legacy` optimizer, you can install the `tf_keras` package (Keras 2) and set the environment variable `TF_USE_LEGACY_KERAS=True` to configure TensorFlow to use `tf_keras` when accessing `tf.keras`.
Temporary solution: downgrade keras and tensorflow to keras v2.15 and tensorflow v2.15
pip uninstall keras
pip uninstall tensorflow
pip install keras==2.15 tensorflow==2.15
Will not run with Keras v3 and Tensorflow v2.16.
Here's the error:
Temporary solution: downgrade keras and tensorflow to keras v2.15 and tensorflow v2.15