Workaround until the new bolt_on module is integrated into the rest of the TF Privacy build system.

PiperOrigin-RevId: 261222062
This commit is contained in:
Zachary Garrett 2019-08-01 16:32:08 -07:00 committed by A. Unique TensorFlower
parent 9fe5e91de4
commit c08f3ebdc7

View file

@ -13,6 +13,10 @@
# limitations under the License. # limitations under the License.
"""TensorFlow Privacy library.""" """TensorFlow Privacy library."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
# pylint: disable=g-import-not-at-top # pylint: disable=g-import-not-at-top
@ -42,8 +46,11 @@ else:
from privacy.optimizers.dp_optimizer import DPGradientDescentGaussianOptimizer from privacy.optimizers.dp_optimizer import DPGradientDescentGaussianOptimizer
from privacy.optimizers.dp_optimizer import DPGradientDescentOptimizer from privacy.optimizers.dp_optimizer import DPGradientDescentOptimizer
try:
from privacy.bolt_on.models import BoltOnModel from privacy.bolt_on.models import BoltOnModel
from privacy.bolt_on.optimizers import BoltOn from privacy.bolt_on.optimizers import BoltOn
from privacy.bolt_on.losses import StrongConvexMixin from privacy.bolt_on.losses import StrongConvexMixin
from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy
from privacy.bolt_on.losses import StrongConvexHuber from privacy.bolt_on.losses import StrongConvexHuber
except ImportError:
print('module `bolt_on` was not found in this version of TF Privacy')