Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lion optimizer : module 'tensorflow.keras.optimizers' has no attribute 'legacy' #1183

Open
zx-lhb opened this issue Feb 22, 2023 · 1 comment

Comments

@zx-lhb
Copy link

zx-lhb commented Feb 22, 2023

hello, I try to use Lion optimizer, but I got the error : module 'tensorflow.keras.optimizers' has no attribute 'legacy'. Then I check the TF2 api doc(v2.11), it does not have legacy. So I think it is not inhirit from the base class as the standard TF2 recommand? Can you tell me how to fix it ?

@Cyril9227
Copy link

class Lion(tf.keras.optimizers.Optimizer) will do the trick

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 a pull request may close this issue.

2 participants