class_docstr: Trains, evaluates, and saves a Keras model.
code: def execute(self):
      log_dir = os.path.join(
          self._tensorboard_base_dir, str(int(time.time()))
      )
      tensorboard = tf.keras.callbacks.TensorBoard(
          log_dir=log_dir, update_freq="batch"
      )
      if self._model.trainable:
          self._model.fit(self._train_dataset, callbacks=[tensorboard])
      else:
          print("Skipping training since model.trainable set to false.")
      results = self._model.evaluate(
          self._eval_dataset, callbacks=[tensorboard]
      )
      # If the model was compiled with metrics, the results is a list of loss +
      # metric values. If the model was compiled without metrics, it is a loss
      # scalar.
      if not isinstance(results, list):
          results = [results]
      self._storage.save_model(
          ModelContainer(results[0], self._model, results)
      )
  
file_path: adanet/adanet/experimental/work_units/keras_trainer_work_unit.py
imports: import os
  import time
  from adanet.experimental.storages.storage import ModelContainer
  from adanet.experimental.storages.storage import Storage
  from adanet.experimental.work_units import work_unit
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the KerasTrainerWorkUnit obj's underlying member method code with example usage: obj.execute() without return types