Skip to content

ImportError: keras.optimizers.legacy is not supported in Keras 3 #14

@saraxvn

Description

@saraxvn

When trying to run nlc.nonlincausalitymeasureNN, I come across the below error, even when I follow the suggestions i.e., installing tf_keras etc. I also tried downgrading keras and tensorflow, but I still get the same error.

I would be grateful if you could provide some assistance on this, as I am very interested in using this package. Many thanks!

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions