class_docstr_tok: []
code: def __init__(self, **kwargs):
      add_parameter(
          self, kwargs, "epoch_prediction_data_collection", None
      )
      add_parameter(self, kwargs, "epoch_prediction_object", None)
      add_parameter(self, kwargs, "epoch_prediction_batch_size", 1)
      add_parameter(self, kwargs, "epoch_prediction_dir", None)
  
      add_parameter(self, kwargs, "deepneuro_model", None)
  
      add_parameter(self, kwargs, "show_callback_output", False)
      add_parameter(self, kwargs, "epoch_prediction_output_mode", "gif")
  
      self.kwargs = kwargs
  
      if not os.path.exists(self.epoch_prediction_dir):
          os.mkdir(self.epoch_prediction_dir)
  
      self.predictions = []
  
      # Investigate why this doesn't happen by default.
      if self.epoch_prediction_batch_size is None:
          self.epoch_prediction_batch_size = 1
  
      # There's a more concise way to do this..
      self.predict_data = next(
          self.epoch_prediction_data_collection.data_generator(
              perpetual=True,
              verbose=False,
              just_one_batch=True,
              batch_size=self.epoch_prediction_batch_size,
          )
      )
  
imports: import os
  import imageio
  import numpy
  from keras.callbacks import ModelCheckpoint, EarlyStopping, CSVLogger, Callback
  from keras import backend
  from deepneuro.utilities.util import add_parameter
  from deepneuro.utilities.visualize import check_data
label_desc: Use image node_id 1 to create a new EpochPredict object from inherited base classes: Callback with example: obj = EpochPredict()