class_docstr: Test cases for keras model fitting.
class_docstr_tok: ["Test","cases","for","keras","model","fitting","."]
docstr: Tests fitting of BoltOnModel.
  
  Args:
    generator: True for generator test, False for iterator test.
    reset_n_samples: True to reset the n_samples to None, False does nothing
code: def test_fit(self, generator, reset_n_samples):
      """Tests fitting of BoltOnModel.
  
      Args:
        generator: True for generator test, False for iterator test.
        reset_n_samples: True to reset the n_samples to None, False does nothing
      """
      loss = TestLoss(1, 1, 1)
      optimizer = BoltOn(TestOptimizer(), loss)
      n_classes = 2
      input_dim = 5
      epsilon = 1
      batch_size = 1
      n_samples = 10
      clf = _do_fit(
          n_samples,
          input_dim,
          n_classes,
          epsilon,
          generator,
          batch_size,
          reset_n_samples,
          optimizer,
          loss,
      )
      self.assertEqual(hasattr(clf, "layers"), True)
  
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 1 for calling the FitTests obj's underlying member method code with example usage: obj.test_fit(generator, reset_n_samples) without return types