Fix python3 bug: range() is no longer list

This commit is contained in:
Nicholas Carlini 2018-12-26 18:23:36 +00:00
parent 183d751c13
commit 21de1f9dd8

View file

@ -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,