'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 (list[str]): list of tensor names that should be ignored during loading, e.g. learning-rate'

def __init__(self, model_path, prefix=None, ignore=[]):

    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
    self.prefix = prefix
    self.ignore = [(i if i.endswith(':0') else (i + ':0')) for i in ignore]
