import tensorflow as tf


    Args:
        data_set: dataset instance to use to access data for training/validation
        weights_from: str, if not None, initializes model from exisiting weights
        start_epoch: int,  epoch number to start training from
            e.g. for retarining set the epoch number you want to resume training from
        summary_every: int, epoch interval to write summary; higher value means lower frequency
            of summary writing
    """
    with tf.Graph().as_default(), tf.device('/gpu:0'):
      self._setup_model_loss(num_classes=num_classes)
      if self.is_summary:
        self._setup_summaries(self.capped_d_grads, self.capped_g_grads)
      self._setup_misc()
      self._print_info(data_set)
      self._train_semi_supervised(data_set, start_epoch, weights_from, summary_every, model_name,
                                  weights_dir)

