Tracks the given TF optimizer for initialization of its variables.
(tf_optimizer)
| 813 | |
| 814 | |
| 815 | def track_tf_optimizer(tf_optimizer): |
| 816 | """Tracks the given TF optimizer for initialization of its variables.""" |
| 817 | if context.executing_eagerly(): |
| 818 | return |
| 819 | graph = get_graph() |
| 820 | optimizers = _GRAPH_TF_OPTIMIZERS.setdefault(graph, weakref.WeakSet()) |
| 821 | optimizers.add(tf_optimizer) |
| 822 | |
| 823 | |
| 824 | def track_variable(v): |
nothing calls this directly
no test coverage detected