From 21de1f9dd83548fd2a62e0c090bb0c6bf218d425 Mon Sep 17 00:00:00 2001 From: Nicholas Carlini Date: Wed, 26 Dec 2018 18:23:36 +0000 Subject: [PATCH] Fix python3 bug: range() is no longer list --- 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 d87defb..a11096f 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, stddev_to_sensitivity_ratio=FLAGS.noise_multiplier,