import tensorflow as tf


    def __init__(self, sess, model, data, config, logger):
        self.model = model
        self.config = config
        self.sess = sess
        self.data = data
        self.logger = logger
        if not self.config.pretrain:  # If not pretrain then initialize variables.
            self.init = tf.group(tf.global_variables_initializer(), tf.local_variables_initializer())
            self.sess.run(self.init)

    def train(self):
        """Train the model for the number of epochs in config.num_epochs.
        Calls validate_epoch if config.use_val is set to true and per config.val_per_epoch.
        Returns:

