class_docstr: Restore a tensorflow checkpoint saved by :class:`tf.train.Saver` or :class:`ModelSaver`.
class_docstr_tok: ["Restore","a","tensorflow","checkpoint","saved","by",":","class",":","`","tf.train.Saver","`","or",":","class",":","`","ModelSaver","`","."]
docstr: Args:
      model_path (str): a model name (model-xxxx) or a ``checkpoint`` file.
      prefix (str): during restore, add a ``prefix/`` for every variable in this checkpoint.
      ignore (tuple[str]): tensor names that should be ignored during loading, e.g. learning-rate
docstr_tok: ["Args",":","model_path","(","str",")",":","a","model","name","(","model-xxxx",")","or","a","``","checkpoint","``","file",".","prefix","(","str",")",":","during","restore",",","add","a","``","prefix\/","``","for","every","variable","in","this","checkpoint",".","ignore","(","tuple","[","str","]",")",":","tensor","names","that","should","be","ignored","during","loading",",","e.g",".","learning-rate"]
code: def __init__(self, model_path, prefix=None, ignore=()):
      """
      Args:
          model_path (str): a model name (model-xxxx) or a ``checkpoint`` file.
          prefix (str): during restore, add a ``prefix/`` for every variable in this checkpoint.
          ignore (tuple[str]): tensor names that should be ignored during loading, e.g. learning-rate
      """
      if model_path.endswith(".npy") or model_path.endswith(".npz"):
          logger.warn(
              "SaverRestore expect a TF checkpoint, but got a model path '{}'.".format(
                  model_path
              )
              + " To load from a dict, use 'DictRestore'."
          )
      model_path = get_checkpoint_path(model_path)
      self.path = model_path  # attribute used by AutoResumeTrainConfig!
      self.prefix = prefix
      self.ignore = [
          i if i.endswith(":0") else i + ":0" for i in ignore
      ]
  
imports: import os
  import numpy
  import six
  from ..compat import tfv1
  from ..utils import logger
  from .common import get_op_tensor_name
  from .varmanip import SessionUpdate, get_checkpoint_path, get_savename_from_varname, is_training_name
label_desc: Use image node_id 1 to create a new SaverRestore object from inherited base classes: SessionInit with example: obj = SaverRestore(model_path, prefix, ignore)