a06bc6c99b89392d2e1809040a40937cfadc8765,privacy/optimizers/dp_optimizer.py,,,#,217
Before Change
return DPGaussianOptimizerClass
// Compatibility with tf 1 and 2 APIs
try:
AdagradOptimizer = tf.compat.v1.train.AdagradOptimizer
AdamOptimizer = tf.compat.v1.train.AdamOptimizer
GradientDescentOptimizer = tf.compat.v1.train.GradientDescentOptimizer
except: // pylint: disable=bare-except
AdagradOptimizer = tf.optimizers.Adagrad
AdamOptimizer = tf.optimizers.Adam
GradientDescentOptimizer = tf.optimizers.SGD // pylint: disable=invalid-name
DPAdagradOptimizer = make_optimizer_class(AdagradOptimizer)
DPAdamOptimizer = make_optimizer_class(AdamOptimizer)
DPGradientDescentOptimizer = make_optimizer_class(GradientDescentOptimizer)
After Change
return DPGaussianOptimizerClass
if LooseVersion(tf.__version__) < LooseVersion("2.0.0"):
AdagradOptimizer = tf.train.AdagradOptimizer
AdamOptimizer = tf.train.AdamOptimizer
GradientDescentOptimizer = tf.train.GradientDescentOptimizer
else:
AdagradOptimizer = tf.optimizers.Adagrad
AdamOptimizer = tf.optimizers.Adam
GradientDescentOptimizer = tf.optimizers.SGD // pylint: disable=invalid-name
DPAdagradOptimizer = make_optimizer_class(AdagradOptimizer)
DPAdamOptimizer = make_optimizer_class(AdamOptimizer)
DPGradientDescentOptimizer = make_optimizer_class(GradientDescentOptimizer)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: tensorflow/privacy
Commit Name: a06bc6c99b89392d2e1809040a40937cfadc8765
Time: 2019-05-23
Author: papernot@google.com
File Name: privacy/optimizers/dp_optimizer.py
Class Name:
Method Name:
Project Name: tensorflow/privacy
Commit Name: a06bc6c99b89392d2e1809040a40937cfadc8765
Time: 2019-05-23
Author: papernot@google.com
File Name: tutorials/mnist_dpsgd_tutorial.py
Class Name:
Method Name:
Project Name: tensorflow/privacy
Commit Name: a06bc6c99b89392d2e1809040a40937cfadc8765
Time: 2019-05-23
Author: papernot@google.com
File Name: privacy/optimizers/dp_optimizer.py
Class Name:
Method Name:
Project Name: tensorflow/privacy
Commit Name: a06bc6c99b89392d2e1809040a40937cfadc8765
Time: 2019-05-23
Author: papernot@google.com
File Name: tutorials/mnist_dpsgd_tutorial_keras.py
Class Name:
Method Name: