From c6c3334b57399fb03cd64fadc89471e07271ecd4 Mon Sep 17 00:00:00 2001 From: Chen Qian Date: Tue, 13 Sep 2022 15:19:44 -0700 Subject: [PATCH] Code changes to get ready for an incoming Keras optimizer migration. DP optimizer only supports legacy optimizer. PiperOrigin-RevId: 474137890 --- .../privacy/optimizers/dp_optimizer_keras_vectorized.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py b/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py index 16a12d5..3915682 100644 --- a/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py +++ b/tensorflow_privacy/privacy/optimizers/dp_optimizer_keras_vectorized.py @@ -252,8 +252,8 @@ def make_vectorized_keras_optimizer_class(cls): VectorizedDPKerasAdagradOptimizer = make_vectorized_keras_optimizer_class( - tf.keras.optimizers.Adagrad) + tf.keras.optimizers.legacy.Adagrad) VectorizedDPKerasAdamOptimizer = make_vectorized_keras_optimizer_class( - tf.keras.optimizers.Adam) + tf.keras.optimizers.legacy.Adam) VectorizedDPKerasSGDOptimizer = make_vectorized_keras_optimizer_class( - tf.keras.optimizers.SGD) + tf.keras.optimizers.legacy.SGD)