class_docstr: Tests for keras model initialization.
class_docstr_tok: ["Tests","for","keras","model","initialization","."]
docstr: test bad compilations of BoltOnModel that should raise errors.
  
  Args:
    n_outputs: number of output neurons
    loss: instantiated TestLoss instance
    optimizer: instantiated TestOptimizer instance
code: def test_bad_compile(self, n_outputs, loss, optimizer):
      """test bad compilations of BoltOnModel that should raise errors.
  
      Args:
        n_outputs: number of output neurons
        loss: instantiated TestLoss instance
        optimizer: instantiated TestOptimizer instance
      """
      # test compilaton of invalid tf.optimizer and non instantiated loss.
      with self.cached_session():
          with self.assertRaises((ValueError, AttributeError)):
              clf = models.BoltOnModel(n_outputs)
              clf.compile(optimizer, loss)
  
imports: from absl.testing import parameterized
  import tensorflow.compat.v1
  from tensorflow.compat.v1.python.framework import ops
  from tensorflow.compat.v1.python.keras import keras_parameterized
  from tensorflow.compat.v1.python.keras import losses
  from tensorflow.compat.v1.python.keras.optimizer_v2.optimizer_v2 import OptimizerV2
  from tensorflow.compat.v1.python.keras.regularizers import L1L2
  from tensorflow_privacy.privacy.bolt_on import models
  from tensorflow_privacy.privacy.bolt_on.losses import StrongConvexMixin
  from tensorflow_privacy.privacy.bolt_on.optimizers import BoltOn
label_desc: Use image node_id 4 for calling the InitTests obj's underlying member method code with example usage: obj.test_bad_compile(n_outputs, loss, optimizer) without return types