Update to allow bazel on tensorflow_privacy to work out of the box.

PiperOrigin-RevId: 225605386
This commit is contained in:
Steve Chien 2018-12-14 14:31:12 -08:00 committed by Nicolas Papernot
parent b8418b0523
commit 0af76c7b3d
6 changed files with 6 additions and 60 deletions

View file

@ -1,55 +0,0 @@
licenses(["notice"]) # Apache 2.0
py_library(
name = "gaussian_average_query",
srcs = ["gaussian_average_query.py"],
deps = [
":private_queries",
"@org_tensorflow//tensorflow:tensorflow_py",
],
)
py_library(
name = "dp_optimizers",
deps = [
":dp_adam",
":dp_gradient_descent",
],
)
py_library(
name = "dp_adam",
srcs = [
"dp_adam.py",
],
deps = [
":gaussian_average_query",
"@org_tensorflow//tensorflow:tensorflow_py",
],
)
py_library(
name = "dp_gradient_descent",
srcs = [
"dp_gradient_descent.py",
],
deps = [
":gaussian_average_query",
"@org_tensorflow//tensorflow:tensorflow_py",
],
)
py_test(
name = "dp_optimizer_test",
srcs = ["dp_optimizer_test.py"],
deps = [
":dp_optimizers",
"@absl_py//absl/testing:parameterized",
"@org_tensorflow//tensorflow:tensorflow_py",
],
)
py_library(
name = "private_queries",
srcs = ["private_queries.py"],
)

View file

@ -20,7 +20,7 @@ from __future__ import print_function
import tensorflow as tf
import tensorflow_privacy.privacy.optimizers.gaussian_average_query as ph
import privacy.optimizers.gaussian_average_query as ph
class DPAdamOptimizer(tf.train.AdamOptimizer):

View file

@ -20,7 +20,7 @@ from __future__ import print_function
import tensorflow as tf
import tensorflow_privacy.privacy.optimizers.gaussian_average_query as ph
import privacy.optimizers.gaussian_average_query as ph
class DPGradientDescentOptimizer(tf.train.GradientDescentOptimizer):

View file

@ -22,8 +22,8 @@ from absl.testing import parameterized
import numpy as np
import tensorflow as tf
from tensorflow_privacy.privacy.optimizers import dp_adam
from tensorflow_privacy.privacy.optimizers import dp_gradient_descent
from privacy.optimizers import dp_adam
from privacy.optimizers import dp_gradient_descent
def loss(val0, val1):

View file

@ -23,7 +23,7 @@ import collections
import tensorflow as tf
from tensorflow_privacy.privacy.optimizers import private_queries
from privacy.optimizers import private_queries
class GaussianAverageQuery(private_queries.PrivateAverageQuery):

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
tensorflow