@tf_export('train.list_variables')
def list_variables(ckpt_dir_or_file):
    'Returns list of all variables in the checkpoint.\n\n  Args:\n    ckpt_dir_or_file: Directory with checkpoints file or path to checkpoint.\n\n  Returns:\n    List of tuples `(name, shape)`.\n  '
    reader = load_checkpoint(ckpt_dir_or_file)
    variable_map = reader.get_variable_to_shape_map()
    names = sorted(variable_map.keys())
    result = []
    for name in names:
        result.append((name, variable_map[name]))
    return result
Returns list of all variables in the checkpoint.

Args:
  ckpt_dir_or_file: Directory with checkpoints file or path to checkpoint.

Returns:
  List of tuples `(name, shape)`.
@tf_export('train.list_variables')
def list_variables(ckpt_dir_or_file):
    'Returns list of all variables in the checkpoint.\n\n  Args:\n    ckpt_dir_or_file: Directory with checkpoints file or path to checkpoint.\n\n  Returns:\n    List of tuples `(name, shape)`.\n  '
    reader = load_checkpoint(ckpt_dir_or_file)
    variable_map = reader.get_variable_to_shape_map()
    names = sorted(variable_map.keys())
    result = []
    for name in names:
        result.append((name, variable_map[name]))
    return result