diff --git a/tensorflow_privacy/BUILD b/tensorflow_privacy/BUILD index baceceba..4bcd1b29 100644 --- a/tensorflow_privacy/BUILD +++ b/tensorflow_privacy/BUILD @@ -33,6 +33,9 @@ py_library( "//tensorflow_privacy/privacy/dp_query:tree_range_query", "//tensorflow_privacy/privacy/estimators:dnn", "//tensorflow_privacy/privacy/keras_models:dp_keras_model", + "//tensorflow_privacy/privacy/logistic_regression:datasets", + "//tensorflow_privacy/privacy/logistic_regression:multinomial_logistic", + "//tensorflow_privacy/privacy/logistic_regression:single_layer_softmax", "//tensorflow_privacy/privacy/optimizers:dp_optimizer_keras", "//tensorflow_privacy/privacy/optimizers:dp_optimizer_keras_vectorized", "//tensorflow_privacy/v1:tensorflow_privacy_v1", diff --git a/tensorflow_privacy/__init__.py b/tensorflow_privacy/__init__.py index 5938b4dc..538af679 100644 --- a/tensorflow_privacy/__init__.py +++ b/tensorflow_privacy/__init__.py @@ -71,4 +71,13 @@ from tensorflow_privacy.privacy.optimizers.dp_optimizer_keras_vectorized import VectorizedDPKerasSGDOptimizer from tensorflow_privacy.privacy.optimizers.dp_optimizer_keras_vectorized import make_vectorized_keras_optimizer_class + # Logistic regression + from tensorflow_privacy.privacy.logistic_regression.datasets import linearly_separable_labeled_examples + from tensorflow_privacy.privacy.logistic_regression.datasets import synthetic_linearly_separable_data + + from tensorflow_privacy.privacy.logistic_regression.multinomial_logistic import logistic_objective_perturbation + from tensorflow_privacy.privacy.logistic_regression.multinomial_logistic import logistic_dpsgd + + from tensorflow_privacy.privacy.logistic_regression.single_layer_softmax import single_layer_softmax_classifier + # module `bolt_on` not yet available in this version of TF Privacy diff --git a/tensorflow_privacy/privacy/logistic_regression/BUILD b/tensorflow_privacy/privacy/logistic_regression/BUILD index ef2bca01..73ddb2e3 100644 --- a/tensorflow_privacy/privacy/logistic_regression/BUILD +++ b/tensorflow_privacy/privacy/logistic_regression/BUILD @@ -4,6 +4,11 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) +py_library( + name = "logistic_regression", + srcs = ["__init__.py"], +) + py_library( name = "multinomial_logistic", srcs = ["multinomial_logistic.py"], diff --git a/tensorflow_privacy/privacy/logistic_regression/__init__.py b/tensorflow_privacy/privacy/logistic_regression/__init__.py new file mode 100644 index 00000000..5cd3f91f --- /dev/null +++ b/tensorflow_privacy/privacy/logistic_regression/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022, The TensorFlow Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License.