2019-03-25 11:20:41 -06:00
|
|
|
# Copyright 2019, The TensorFlow Privacy 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.
|
|
|
|
"""TensorFlow Privacy library."""
|
|
|
|
|
2019-04-11 18:06:33 -06:00
|
|
|
import sys
|
2019-03-25 11:20:41 -06:00
|
|
|
|
2019-04-11 18:06:33 -06:00
|
|
|
# pylint: disable=g-import-not-at-top
|
2019-03-25 11:20:41 -06:00
|
|
|
|
2019-04-11 18:06:33 -06:00
|
|
|
if hasattr(sys, 'skip_tf_privacy_import'): # Useful for standalone scripts.
|
|
|
|
pass
|
|
|
|
else:
|
2019-04-12 15:10:29 -06:00
|
|
|
from privacy.analysis.privacy_ledger import DummyLedger
|
|
|
|
from privacy.analysis.privacy_ledger import GaussianSumQueryEntry
|
|
|
|
from privacy.analysis.privacy_ledger import PrivacyLedger
|
|
|
|
from privacy.analysis.privacy_ledger import QueryWithLedger
|
|
|
|
from privacy.analysis.privacy_ledger import SampleEntry
|
2019-04-11 18:06:33 -06:00
|
|
|
|
2019-04-12 15:10:29 -06:00
|
|
|
from privacy.dp_query.dp_query import DPQuery
|
|
|
|
from privacy.dp_query.gaussian_query import GaussianAverageQuery
|
|
|
|
from privacy.dp_query.gaussian_query import GaussianSumQuery
|
|
|
|
from privacy.dp_query.nested_query import NestedQuery
|
|
|
|
from privacy.dp_query.no_privacy_query import NoPrivacyAverageQuery
|
|
|
|
from privacy.dp_query.no_privacy_query import NoPrivacySumQuery
|
|
|
|
from privacy.dp_query.normalized_query import NormalizedQuery
|
2019-05-14 14:35:08 -06:00
|
|
|
from privacy.dp_query.quantile_adaptive_clip_sum_query import QuantileAdaptiveClipSumQuery
|
|
|
|
from privacy.dp_query.quantile_adaptive_clip_sum_query import QuantileAdaptiveClipAverageQuery
|
2019-04-11 18:06:33 -06:00
|
|
|
|
2019-04-12 15:10:29 -06:00
|
|
|
from privacy.optimizers.dp_optimizer import DPAdagradGaussianOptimizer
|
|
|
|
from privacy.optimizers.dp_optimizer import DPAdagradOptimizer
|
|
|
|
from privacy.optimizers.dp_optimizer import DPAdamGaussianOptimizer
|
|
|
|
from privacy.optimizers.dp_optimizer import DPAdamOptimizer
|
|
|
|
from privacy.optimizers.dp_optimizer import DPGradientDescentGaussianOptimizer
|
|
|
|
from privacy.optimizers.dp_optimizer import DPGradientDescentOptimizer
|