class_docstr: Abstract class for models.
  
  Implements default session checkpoint restore methods.
docstr: 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.
docstr_tok: ["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","."]
code: def initialize_with_checkpoint_and_metagraph(
      self, checkpoint_filename, metagraph_filename
  ):
      """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.
      """
      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)
  
file_path: magenta/magenta/models/shared/model.py
imports: import abc
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the BaseModel obj's underlying member method code with example usage: obj.initialize_with_checkpoint_and_metagraph(checkpoint_filename, metagraph_filename) without return types