Fix python3 bug: range() is no longer list. From @carlini

PiperOrigin-RevId: 228237806
This commit is contained in:
Steve Chien 2019-01-07 14:36:24 -08:00 committed by schien1729
parent 251d6298c6
commit a7190fc1ed

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,
noise_multiplier=FLAGS.noise_multiplier,