import tensorflow as tf

            config = tf.ConfigProto(log_device_placement=False)
            if self.on_gpu:
                config.gpu_options.allow_growth = True

            self.sess = tf.Session(config=config)
            self.sess.run(init)

            checkpoint_file = self.model_dir
