raise app.UsageError("N must be larger than the batch size.")
orders = ([1.25, 1.5, 1.75, 2., 2.25, 2.5, 3., 3.5, 4., 4.5] +
list(range(5, 64)) + [128, 256, 512])
steps = int(math.ceil(FLAGS.epochs * FLAGS.N / FLAGS.batch_size))
apply_dp_sgd_analysis(q, FLAGS.noise_multiplier, steps, orders, FLAGS.delta)
After Change
assert FLAGS.N is not None, "Flag N is missing."
assert FLAGS.batch_size is not None, "Flag batch_size is missing."
assert FLAGS.noise_multiplier is not None, "Flag noise_multiplier is missing."
assert FLAGS.epochs is not None, "Flag epochs is missing."
compute_dp_sgd_privacy(FLAGS.N, FLAGS.batch_size, FLAGS.noise_multiplier,
FLAGS.epochs, FLAGS.delta)