Returns variables corresponding to the given graph for initialization.
(graph=None)
| 881 | |
| 882 | |
| 883 | def _get_variables(graph=None): |
| 884 | """Returns variables corresponding to the given graph for initialization.""" |
| 885 | assert not context.executing_eagerly() |
| 886 | variables = _GRAPH_VARIABLES.setdefault(graph, weakref.WeakSet()) |
| 887 | for opt in _GRAPH_TF_OPTIMIZERS.get(graph, set()): |
| 888 | variables.update(opt.optimizer.variables()) |
| 889 | return variables |
| 890 | |
| 891 | |
| 892 | def _initialize_variables(session): |
no test coverage detected