diff --git a/privacy/analysis/compute_dp_sgd_privacy.py b/privacy/analysis/compute_dp_sgd_privacy.py index e2d8fbd..04408e8 100644 --- a/privacy/analysis/compute_dp_sgd_privacy.py +++ b/privacy/analysis/compute_dp_sgd_privacy.py @@ -37,8 +37,8 @@ import math from absl import app from absl import flags -from privacy.analysis.rdp_accountant import compute_rdp -from privacy.analysis.rdp_accountant import get_privacy_spent +from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp +from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent FLAGS = flags.FLAGS diff --git a/privacy/analysis/rdp_accountant_test.py b/privacy/analysis/rdp_accountant_test.py index 79cb797..1237129 100644 --- a/privacy/analysis/rdp_accountant_test.py +++ b/privacy/analysis/rdp_accountant_test.py @@ -25,7 +25,7 @@ from absl.testing import parameterized import mpmath as mp import numpy as np -from privacy.analysis import rdp_accountant +from tensorflow_privacy.privacy.analysis import rdp_accountant class TestGaussianMoments(parameterized.TestCase): diff --git a/privacy/optimizers/dp_optimizer.py b/privacy/optimizers/dp_optimizer.py index cd82c2d..958354d 100644 --- a/privacy/optimizers/dp_optimizer.py +++ b/privacy/optimizers/dp_optimizer.py @@ -19,7 +19,7 @@ from __future__ import print_function import tensorflow as tf -from privacy.optimizers import gaussian_query +from tensorflow_privacy.privacy.optimizers import gaussian_query def make_optimizer_class(cls): diff --git a/privacy/optimizers/dp_optimizer_test.py b/privacy/optimizers/dp_optimizer_test.py index 16b5591..91e12fb 100644 --- a/privacy/optimizers/dp_optimizer_test.py +++ b/privacy/optimizers/dp_optimizer_test.py @@ -22,8 +22,8 @@ import mock import numpy as np import tensorflow as tf -from privacy.optimizers import dp_optimizer -from privacy.optimizers import gaussian_query +from tensorflow_privacy.privacy.optimizers import dp_optimizer +from tensorflow_privacy.privacy.optimizers import gaussian_query def loss(val0, val1): diff --git a/privacy/optimizers/gaussian_query.py b/privacy/optimizers/gaussian_query.py index 264d9d8..9f865a8 100644 --- a/privacy/optimizers/gaussian_query.py +++ b/privacy/optimizers/gaussian_query.py @@ -23,7 +23,7 @@ import collections import tensorflow as tf -from privacy.optimizers import dp_query +from tensorflow_privacy.privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/gaussian_query_test.py b/privacy/optimizers/gaussian_query_test.py index 7b5be7f..0f2ee51 100644 --- a/privacy/optimizers/gaussian_query_test.py +++ b/privacy/optimizers/gaussian_query_test.py @@ -22,8 +22,8 @@ from absl.testing import parameterized import numpy as np import tensorflow as tf -from privacy.optimizers import gaussian_query -from privacy.optimizers import test_utils +from tensorflow_privacy.privacy.optimizers import gaussian_query +from tensorflow_privacy.privacy.optimizers import test_utils class GaussianQueryTest(tf.test.TestCase, parameterized.TestCase): diff --git a/privacy/optimizers/nested_query.py b/privacy/optimizers/nested_query.py index 6aa4154..748556c 100644 --- a/privacy/optimizers/nested_query.py +++ b/privacy/optimizers/nested_query.py @@ -22,7 +22,7 @@ from __future__ import print_function import tensorflow as tf -from privacy.optimizers import dp_query +from tensorflow_privacy.privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/nested_query_test.py b/privacy/optimizers/nested_query_test.py index c9f0b24..ba49c8c 100644 --- a/privacy/optimizers/nested_query_test.py +++ b/privacy/optimizers/nested_query_test.py @@ -23,9 +23,9 @@ from absl.testing import parameterized import numpy as np import tensorflow as tf -from privacy.optimizers import gaussian_query -from privacy.optimizers import nested_query -from privacy.optimizers import test_utils +from tensorflow_privacy.privacy.optimizers import gaussian_query +from tensorflow_privacy.privacy.optimizers import nested_query +from tensorflow_privacy.privacy.optimizers import test_utils nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/no_privacy_query.py b/privacy/optimizers/no_privacy_query.py index d53e88a..ea35caf 100644 --- a/privacy/optimizers/no_privacy_query.py +++ b/privacy/optimizers/no_privacy_query.py @@ -19,7 +19,7 @@ from __future__ import print_function import tensorflow as tf -from privacy.optimizers import dp_query +from tensorflow_privacy.privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/no_privacy_query_test.py b/privacy/optimizers/no_privacy_query_test.py index 5da0753..45a2fa9 100644 --- a/privacy/optimizers/no_privacy_query_test.py +++ b/privacy/optimizers/no_privacy_query_test.py @@ -21,8 +21,8 @@ from __future__ import print_function from absl.testing import parameterized import tensorflow as tf -from privacy.optimizers import no_privacy_query -from privacy.optimizers import test_utils +from tensorflow_privacy.privacy.optimizers import no_privacy_query +from tensorflow_privacy.privacy.optimizers import test_utils class NoPrivacyQueryTest(tf.test.TestCase, parameterized.TestCase): diff --git a/tutorials/mnist_dpsgd_tutorial.py b/tutorials/mnist_dpsgd_tutorial.py index 9d182a1..1a4a1dc 100644 --- a/tutorials/mnist_dpsgd_tutorial.py +++ b/tutorials/mnist_dpsgd_tutorial.py @@ -21,9 +21,9 @@ from __future__ import print_function import numpy as np import tensorflow as tf -from privacy.analysis.rdp_accountant import compute_rdp -from privacy.analysis.rdp_accountant import get_privacy_spent -from privacy.optimizers import dp_optimizer +from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp +from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent +from tensorflow_privacy.privacy.optimizers import dp_optimizer tf.flags.DEFINE_boolean('dpsgd', True, 'If True, train with DP-SGD. If False, ' 'train with vanilla SGD.')