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)`.
(ckpt_dir_or_file)
| 89 | |
| 90 | @tf_export("train.list_variables") |
| 91 | def list_variables(ckpt_dir_or_file): |
| 92 | """Returns list of all variables in the checkpoint. |
| 93 | |
| 94 | Args: |
| 95 | ckpt_dir_or_file: Directory with checkpoints file or path to checkpoint. |
| 96 | |
| 97 | Returns: |
| 98 | List of tuples `(name, shape)`. |
| 99 | """ |
| 100 | reader = load_checkpoint(ckpt_dir_or_file) |
| 101 | variable_map = reader.get_variable_to_shape_map() |
| 102 | names = sorted(variable_map.keys()) |
| 103 | result = [] |
| 104 | for name in names: |
| 105 | result.append((name, variable_map[name])) |
| 106 | return result |
| 107 | |
| 108 | |
| 109 | def wait_for_new_checkpoint(checkpoint_dir, |
nothing calls this directly
no test coverage detected