Skip to content

ImportError: keras.optimizers.legacy#11

Open
EVDIO wants to merge 1 commit intomrosol:masterfrom
EVDIO:patch-1
Open

ImportError: keras.optimizers.legacy#11
EVDIO wants to merge 1 commit intomrosol:masterfrom
EVDIO:patch-1

Conversation

@EVDIO
Copy link
Copy Markdown

@EVDIO EVDIO commented Aug 26, 2024

I get this error. Calling Adam like that is not compatible anymore for Keras 3.

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.

I get this error. Calling Adam like that is not compatible anymore for Keras 3. 

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.
@saraxvn
Copy link
Copy Markdown

saraxvn commented Nov 27, 2024

Hi, I am also getting this error. Tried different things, such as installing older versions of keras and tensorflow, but nothing has changed the error. Did you find a way to solve this, and use the nonlincausality package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants