class_docstr: Test cases for keras model fitting.
class_docstr_tok: ["Test","cases","for","keras","model","fitting","."]
docstr: Tests fitting with invalid parameters, which should raise an error.
  
  Args:
    generator: True to test with generator, False is iterator
    reset_n_samples: True to reset the n_samples param to None prior to
      passing it to fit
    distribution: distribution to get noise from.
code: def test_bad_fit(self, generator, reset_n_samples, distribution):
      """Tests fitting with invalid parameters, which should raise an error.
  
      Args:
        generator: True to test with generator, False is iterator
        reset_n_samples: True to reset the n_samples param to None prior to
          passing it to fit
        distribution: distribution to get noise from.
      """
      with self.assertRaises(ValueError):
          loss = TestLoss(1, 1, 1)
          optimizer = TestOptimizer()
          n_classes = 2
          input_dim = 5
          epsilon = 1
          batch_size = 1
          n_samples = 10
          _do_fit(
              n_samples,
              input_dim,
              n_classes,
              epsilon,
              generator,
              batch_size,
              reset_n_samples,
              optimizer,
              loss,
              distribution,
          )
  
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 3 for calling the FitTests obj's underlying member method code with example usage: obj.test_bad_fit(generator, reset_n_samples, distribution) without return types