def _start_session(self):
"""
Starts the Tensorflow Session
:return: None
"""
self.sess.run(tf.global_variables_initializer())
# initialize the saver node
# print tf.GraphKeys.GLOBAL_VARIABLES
self.saver = tf.train.Saver(tf.global_variables())
# get the latest checkpoint
last_checkpoint_path = self.checkpointer.get_last_checkpoint()
if last_checkpoint_path is not None:
print 'Previous saved tensorflow objects found... Extracting...'
# restore the tensorflow variables
self.saver.restore(self.sess, last_checkpoint_path)
print 'Extraction Complete. Moving Forward....'
评论列表
文章目录