class_docstr: BoltOn episilon-delta differential privacy model.
  
  The privacy guarantees are dependent on the noise that is sampled. Please
  see the paper linked below for more details.
  
  Uses 4 key steps to achieve privacy guarantees:
  1. Adds noise to weights after training (output perturbation).
  2. Projects weights to R after each batch
  3. Limits learning rate
  4. Use a strongly convex loss function (see compile)
  
  For more details on the strong convexity requirements, see:
  Bolt-on Differential Privacy for Scalable Stochastic Gradient
  Descent-based Analytics by Xi Wu et al.
docstr: See super class.
  
  Default optimizer used in BoltOn method is SGD.
  
  Args:
    optimizer: The optimizer to use. This will be automatically wrapped with
      the BoltOn Optimizer.
    loss: The loss function to use. Must be a StrongConvex loss (extend the
      StrongConvexMixin).
    kernel_initializer: The kernel initializer to use for the single layer.
    **kwargs: kwargs to keras Model.compile. See super.
docstr_tok: ["See","super","class",".","Default","optimizer","used","in","BoltOn","method","is","SGD",".","Args",":","optimizer",":","The","optimizer","to","use",".","This","will","be","automatically","wrapped","with","the","BoltOn","Optimizer",".","loss",":","The","loss","function","to","use",".","Must","be","a","StrongConvex","loss","(","extend","the","StrongConvexMixin",")",".","kernel_initializer",":","The","kernel","initializer","to","use","for","the","single","layer",".","*","*","kwargs",":","kwargs","to","keras","Model.compile",".","See","super","."]
code: def compile(
      self,
      optimizer,
      loss,
      kernel_initializer=tf.initializers.GlorotUniform,
      **kwargs,
  ):  # pylint: disable=arguments-differ
      """See super class.
  
      Default optimizer used in BoltOn method is SGD.
  
      Args:
        optimizer: The optimizer to use. This will be automatically wrapped with
          the BoltOn Optimizer.
        loss: The loss function to use. Must be a StrongConvex loss (extend the
          StrongConvexMixin).
        kernel_initializer: The kernel initializer to use for the single layer.
        **kwargs: kwargs to keras Model.compile. See super.
      """
      if not isinstance(loss, StrongConvexMixin):
          raise ValueError(
              "loss function must be a Strongly Convex and therefore "
              "extend the StrongConvexMixin."
          )
      if (
          not self._layers_instantiated
      ):  # compile may be called multiple times
          # for instance, if the input/outputs are not defined until fit.
          self.output_layer = tf.keras.layers.Dense(
              self.n_outputs,
              kernel_regularizer=loss.kernel_regularizer(),
              kernel_initializer=kernel_initializer(),
          )
          self._layers_instantiated = True
      if not isinstance(optimizer, BoltOn):
          optimizer = optimizers.get(optimizer)
          optimizer = BoltOn(optimizer, loss)
  
      super(BoltOnModel, self).compile(optimizer, loss=loss, **kwargs)
  
file_path: privacy/tensorflow_privacy/privacy/bolt_on/models.py
imports: import tensorflow.compat.v1
  from tensorflow.compat.v1.python.framework import ops
  from tensorflow.compat.v1.python.keras import optimizers
  from tensorflow.compat.v1.python.keras.models import Model
  from tensorflow_privacy.privacy.bolt_on.losses import StrongConvexMixin
  from tensorflow_privacy.privacy.bolt_on.optimizers import BoltOn
label_desc: Use image node_id 3 for calling the BoltOnModel obj's underlying member method code with example usage: obj.compile(optimizer, loss, kernel_initializer) without return types