From 0a0e5cb3c370dbf8de7fef5a58414ec7fd6dea05 Mon Sep 17 00:00:00 2001 From: Shadi Rahimian Date: Tue, 26 Mar 2019 15:28:09 +0100 Subject: [PATCH 1/3] line 83 produces error TypeError: can only concatenate list (not "range") to list --- privacy/analysis/compute_dp_sgd_privacy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/privacy/analysis/compute_dp_sgd_privacy.py b/privacy/analysis/compute_dp_sgd_privacy.py index e2d8fbd..3357994 100644 --- a/privacy/analysis/compute_dp_sgd_privacy.py +++ b/privacy/analysis/compute_dp_sgd_privacy.py @@ -80,8 +80,7 @@ def main(argv): if q > 1: 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] + range(5, 64) + - [128, 256, 512]) + 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)) From 8db2dd6bca656beafe7f29e5711d37959d71d2ce Mon Sep 17 00:00:00 2001 From: Nicolas Papernot Date: Wed, 27 Mar 2019 09:18:45 -0700 Subject: [PATCH 2/3] Update compute_dp_sgd_privacy.py --- privacy/analysis/compute_dp_sgd_privacy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/privacy/analysis/compute_dp_sgd_privacy.py b/privacy/analysis/compute_dp_sgd_privacy.py index 3357994..f0877c2 100644 --- a/privacy/analysis/compute_dp_sgd_privacy.py +++ b/privacy/analysis/compute_dp_sgd_privacy.py @@ -80,7 +80,8 @@ def main(argv): if q > 1: 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] + 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)) From 01e7cac7b5480f59d6675057c1f3af4d0877a8e0 Mon Sep 17 00:00:00 2001 From: Nicolas Papernot Date: Wed, 27 Mar 2019 09:22:58 -0700 Subject: [PATCH 3/3] Update compute_dp_sgd_privacy.py --- privacy/analysis/compute_dp_sgd_privacy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/privacy/analysis/compute_dp_sgd_privacy.py b/privacy/analysis/compute_dp_sgd_privacy.py index f0877c2..083b85a 100644 --- a/privacy/analysis/compute_dp_sgd_privacy.py +++ b/privacy/analysis/compute_dp_sgd_privacy.py @@ -80,7 +80,7 @@ def main(argv): if q > 1: 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] + + 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))