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:
parent
9fe5e91de4
commit
c08f3ebdc7
1 changed files with 12 additions and 5 deletions
|
@ -13,6 +13,10 @@
|
|||
# limitations under the License.
|
||||
"""TensorFlow Privacy library."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
# 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 DPGradientDescentOptimizer
|
||||
|
||||
from privacy.bolt_on.models import BoltOnModel
|
||||
from privacy.bolt_on.optimizers import BoltOn
|
||||
from privacy.bolt_on.losses import StrongConvexMixin
|
||||
from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy
|
||||
from privacy.bolt_on.losses import StrongConvexHuber
|
||||
try:
|
||||
from privacy.bolt_on.models import BoltOnModel
|
||||
from privacy.bolt_on.optimizers import BoltOn
|
||||
from privacy.bolt_on.losses import StrongConvexMixin
|
||||
from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy
|
||||
from privacy.bolt_on.losses import StrongConvexHuber
|
||||
except ImportError:
|
||||
print('module `bolt_on` was not found in this version of TF Privacy')
|
||||
|
|
Loading…
Reference in a new issue