import tensorflow as tf


            # Restore from some checkpoint
            if self._restore_chkptfile is not None:
                raw_sess = self.get_raw_session()
                if raw_sess.run(self.global_step) == 0:
                    self._network.restore(raw_sess, self._restore_chkptfile)
        else:
            self.sess = tf.Session(config=sess_config)
            #all_variables = tf.get_collection_ref(tf.GraphKeys.GLOBAL_VARIABLES)
            #self.sess.run(tf.variables_initializer(all_variables))
        
        if self._save_model:
            self._save_graph()

