From 7647c54a277d872deee518449565267f5c692da0 Mon Sep 17 00:00:00 2001 From: Steve Chien Date: Fri, 27 Mar 2020 12:07:36 -0700 Subject: [PATCH] Minor fix regarding tf.compat.v1 in mnist_dpsgd_tutorial_vectorized. PiperOrigin-RevId: 303379200 --- tutorials/mnist_dpsgd_tutorial_vectorized.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/mnist_dpsgd_tutorial_vectorized.py b/tutorials/mnist_dpsgd_tutorial_vectorized.py index a4bc78b..c282c21 100644 --- a/tutorials/mnist_dpsgd_tutorial_vectorized.py +++ b/tutorials/mnist_dpsgd_tutorial_vectorized.py @@ -106,7 +106,7 @@ def cnn_model_fn(features, labels, mode): else: optimizer = GradientDescentOptimizer(learning_rate=FLAGS.learning_rate) opt_loss = scalar_loss - global_step = tf.compat.get_global_step() + global_step = tf.train.get_global_step() train_op = optimizer.minimize(loss=opt_loss, global_step=global_step) # In the following, we pass the mean of the loss (scalar_loss) rather than # the vector_loss because tf.estimator requires a scalar loss. This is only