def __init__(
      self,
      model_config,
      debug = False,
      tpu = None,
      distribution_strategy = None,
      tb_log_dir = None):
    """Configure the trainer.

    Args:
      model_config: ModelConfig parameters for training
      debug: Enables certain debug behaviors like dataset subsampling
      tpu: The TPU to use or None otherwise
      distribution_strategy: Parallel training strategy
      tb_log_dir: The directory for Tensorboard to log to
    """
    self._debug = debug
    if debug:
      logging.info('Debug mode enabled on trainer')
    self._tpu = tpu
    self._distribution_strategy = distribution_strategy
    self._tb_log_dir = tb_log_dir
    self._strategy: Optional[tf.distribute.Strategy] = None
    self._model_config = model_config
    self._vocab: Optional[List[Text]] = None
    self._vocab_stats: Dict[Text, Any] = {}
    self._class_stats: Dict[int, int] = {0: 0, 1: 0}
    # Whitespace tokenizer
    self._tokenizer: Optional[tokenizers.Tokenizer] = None
    self._encoder: Optional[preprocessing.FeverTextEncoder] = None
    self._model: Optional[tf.keras.Model] = None
    self._inner_model: Optional[tf.keras.Model] = None
Configure the trainer.

    Args:
      model_config: ModelConfig parameters for training
      debug: Enables certain debug behaviors like dataset subsampling
      tpu: The TPU to use or None otherwise
      distribution_strategy: Parallel training strategy
      tb_log_dir: The directory for Tensorboard to log to
    
language/serene/training.py