docstr: Train model according to :attr:`extra_params['fit']` (if appropriate) on training data
docstr_tok: ["Train","model","according","to",":","attr",":","`","extra_params","[","'fit","'","]","`","(","if","appropriate",")","on","training","data"]
code: def fit(self):
      """Train model according to :attr:`extra_params['fit']` (if appropriate) on training data"""
      try:
          self.model_history = self.model.fit(
              self.train_input, self.train_target
          )
      except Exception as _ex:
          G.warn(
              f"KerasModel.fit() failed with Exception: {_ex}\nAttempting standard fit method"
          )
          super().fit()
      finally:
          #################### Record Epochs Elapsed if Model has 'epoch' Attribute ####################
          with suppress(AttributeError):
              # self.epochs_elapsed = len(self.model.epoch)
              self.epochs_elapsed = len(self.model_history.epoch)
  
          #################### Load Model Checkpoint if Possible ####################
          for callback in self.extra_params.get("callbacks", []):
              if callback.__class__.__name__ == "ModelCheckpoint":
                  self.model.model.load_weights(callback.filepath)
  
imports: from hyperparameter_hunter.sentinels import locate_sentinels
  from hyperparameter_hunter.settings import G
  from contextlib import suppress
  import inspect
  import sys
  import warnings
  import sklearn.utils
label_desc: Use image node_id 3 for calling the KerasModel obj's underlying member method code with example usage: obj.fit() without return types