Fix copybara to limit some transformations to the beginning of the line.
PiperOrigin-RevId: 233151293
This commit is contained in:
parent
4d0ab48c35
commit
d75f1b80ba
14 changed files with 28 additions and 28 deletions
|
@ -37,8 +37,8 @@ import math
|
|||
from absl import app
|
||||
from absl import flags
|
||||
|
||||
from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp
|
||||
from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent
|
||||
from privacy.analysis.rdp_accountant import compute_rdp
|
||||
from privacy.analysis.rdp_accountant import get_privacy_spent
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ import collections
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import tensor_buffer
|
||||
from tensorflow_privacy.privacy.optimizers import dp_query
|
||||
from privacy.analysis import tensor_buffer
|
||||
from privacy.optimizers import dp_query
|
||||
|
||||
nest = tf.contrib.framework.nest
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ from __future__ import print_function
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import privacy_ledger
|
||||
from tensorflow_privacy.privacy.optimizers import gaussian_query
|
||||
from tensorflow_privacy.privacy.optimizers import nested_query
|
||||
from tensorflow_privacy.privacy.optimizers import test_utils
|
||||
from privacy.analysis import privacy_ledger
|
||||
from privacy.optimizers import gaussian_query
|
||||
from privacy.optimizers import nested_query
|
||||
from privacy.optimizers import test_utils
|
||||
|
||||
tf.enable_eager_execution()
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ from absl.testing import parameterized
|
|||
import mpmath as mp
|
||||
import numpy as np
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import rdp_accountant
|
||||
from privacy.analysis import rdp_accountant
|
||||
|
||||
|
||||
class TestGaussianMoments(parameterized.TestCase):
|
||||
|
|
|
@ -19,7 +19,7 @@ from __future__ import print_function
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import tensor_buffer
|
||||
from privacy.analysis import tensor_buffer
|
||||
|
||||
tf.enable_eager_execution()
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ from __future__ import print_function
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import privacy_ledger
|
||||
from tensorflow_privacy.privacy.optimizers import gaussian_query
|
||||
from privacy.analysis import privacy_ledger
|
||||
from privacy.optimizers import gaussian_query
|
||||
|
||||
|
||||
def make_optimizer_class(cls):
|
||||
|
|
|
@ -22,9 +22,9 @@ import mock
|
|||
import numpy as np
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import privacy_ledger
|
||||
from tensorflow_privacy.privacy.optimizers import dp_optimizer
|
||||
from tensorflow_privacy.privacy.optimizers import gaussian_query
|
||||
from privacy.analysis import privacy_ledger
|
||||
from privacy.optimizers import dp_optimizer
|
||||
from privacy.optimizers import gaussian_query
|
||||
|
||||
|
||||
def loss(val0, val1):
|
||||
|
|
|
@ -23,7 +23,7 @@ import collections
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.optimizers import dp_query
|
||||
from privacy.optimizers import dp_query
|
||||
|
||||
nest = tf.contrib.framework.nest
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ from absl.testing import parameterized
|
|||
import numpy as np
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.optimizers import gaussian_query
|
||||
from tensorflow_privacy.privacy.optimizers import test_utils
|
||||
from privacy.optimizers import gaussian_query
|
||||
from privacy.optimizers import test_utils
|
||||
|
||||
|
||||
class GaussianQueryTest(tf.test.TestCase, parameterized.TestCase):
|
||||
|
|
|
@ -22,7 +22,7 @@ from __future__ import print_function
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.optimizers import dp_query
|
||||
from privacy.optimizers import dp_query
|
||||
|
||||
nest = tf.contrib.framework.nest
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ from absl.testing import parameterized
|
|||
import numpy as np
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.optimizers import gaussian_query
|
||||
from tensorflow_privacy.privacy.optimizers import nested_query
|
||||
from tensorflow_privacy.privacy.optimizers import test_utils
|
||||
from privacy.optimizers import gaussian_query
|
||||
from privacy.optimizers import nested_query
|
||||
from privacy.optimizers import test_utils
|
||||
|
||||
nest = tf.contrib.framework.nest
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ from __future__ import print_function
|
|||
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.optimizers import dp_query
|
||||
from privacy.optimizers import dp_query
|
||||
|
||||
nest = tf.contrib.framework.nest
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ from __future__ import print_function
|
|||
from absl.testing import parameterized
|
||||
import tensorflow as tf
|
||||
|
||||
from tensorflow_privacy.privacy.optimizers import no_privacy_query
|
||||
from tensorflow_privacy.privacy.optimizers import test_utils
|
||||
from privacy.optimizers import no_privacy_query
|
||||
from privacy.optimizers import test_utils
|
||||
|
||||
|
||||
class NoPrivacyQueryTest(tf.test.TestCase, parameterized.TestCase):
|
||||
|
|
|
@ -21,9 +21,9 @@ from __future__ import print_function
|
|||
import numpy as np
|
||||
import tensorflow as tf
|
||||
|
||||
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
|
||||
from privacy.analysis.rdp_accountant import compute_rdp
|
||||
from privacy.analysis.rdp_accountant import get_privacy_spent
|
||||
from privacy.optimizers import dp_optimizer
|
||||
|
||||
tf.flags.DEFINE_boolean('dpsgd', True, 'If True, train with DP-SGD. If False, '
|
||||
'train with vanilla SGD.')
|
||||
|
|
Loading…
Reference in a new issue