'Builds the TF graph with a checkpoint and metagraph.
Args:
checkpoint_filename: The path to the checkpoint file that should be used.
metagraph_filename: The path to the metagraph file that should be used.'

def initialize_with_checkpoint_and_metagraph(self, checkpoint_filename, metagraph_filename):

    with tf.Graph().as_default():
        self._session = tf.Session()
        new_saver = tf.train.import_meta_graph(metagraph_filename)
        new_saver.restore(self._session, checkpoint_filename)
