Skip to content

Fix DeprecationWarning: Update Adam optimizer 'lr' to 'learning_rate'#48

Open
antonyjasfer wants to merge 1 commit intoML4SCI:mainfrom
antonyjasfer:patch-2
Open

Fix DeprecationWarning: Update Adam optimizer 'lr' to 'learning_rate'#48
antonyjasfer wants to merge 1 commit intoML4SCI:mainfrom
antonyjasfer:patch-2

Conversation

@antonyjasfer
Copy link

Hi team! While reviewing the 2021 QCNN codebase, I noticed the model compilation step uses the deprecated lr argument in tf.keras.optimizers.Adam. In modern versions of TensorFlow (2.11+), this throws an AttributeError and crashes the notebook. I have updated it to the modern learning_rate argument to ensure forward compatibility. Let me know if you'd like me to check the other notebooks for similar Keras deprecations!

Hi team! While reviewing the 2021 QCNN codebase, I noticed the model compilation step uses the deprecated lr argument in tf.keras.optimizers.Adam. In modern versions of TensorFlow (2.11+), this throws an AttributeError and crashes the notebook. I have updated it to the modern learning_rate argument to ensure forward compatibility. Let me know if you'd like me to check the other notebooks for similar Keras deprecations!
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.

1 participant