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

optimizer_adam needs an acces to the legacy optimizer tf.keras.optimizers.legacy.Adam #1352

Open
erdeyl opened this issue Nov 19, 2022 · 2 comments

Comments

@erdeyl
Copy link

erdeyl commented Nov 19, 2022

The error message I get

Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: decay is deprecated in the new Keras optimizer, pleasecheck the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimizers.legacy.Adam.

Thank you

@t-kalinowski
Copy link
Member

Hi,

Thanks for reporting. I can reproduce with Tensorflow 2.11.

Until this is fixed on main and released to CRAN, you can temporarily workaround it by
using the Optimizer constructors directly.

E.g., instead of

optimizer_sgd()

use:

optimizers <- keras::keras$optimizers
optimizers$SGD()

The documentation for the new optimizers can be found here: https://www.tensorflow.org/api_docs/python/tf/keras/optimizers

@erdeyl
Copy link
Author

erdeyl commented Nov 21, 2022

Thank you very much!

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

No branches or pull requests

2 participants