From a7190fc1edc25743c70ea92bdb562e78629113db Mon Sep 17 00:00:00 2001 From: Steve Chien Date: Mon, 7 Jan 2019 14:36:24 -0800 Subject: [PATCH] Fix python3 bug: range() is no longer list. From @carlini PiperOrigin-RevId: 228237806 --- tutorials/mnist_dpsgd_tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/mnist_dpsgd_tutorial.py b/tutorials/mnist_dpsgd_tutorial.py index 10d6ac5..961b334 100644 --- a/tutorials/mnist_dpsgd_tutorial.py +++ b/tutorials/mnist_dpsgd_tutorial.py @@ -153,7 +153,7 @@ def main(unused_argv): """Computes epsilon value for given hyperparameters.""" if FLAGS.noise_multiplier == 0.0: return float('inf') - orders = [1 + x / 10. for x in range(1, 100)] + range(12, 64) + orders = [1 + x / 10. for x in range(1, 100)] + list(range(12, 64)) sampling_probability = FLAGS.batch_size / 60000 rdp = compute_rdp(q=sampling_probability, noise_multiplier=FLAGS.noise_multiplier,