Tracks the given variable for initialization.
(v)
| 822 | |
| 823 | |
| 824 | def track_variable(v): |
| 825 | """Tracks the given variable for initialization.""" |
| 826 | if context.executing_eagerly(): |
| 827 | return |
| 828 | graph = v.graph if hasattr(v, 'graph') else get_graph() |
| 829 | if graph not in _GRAPH_VARIABLES: |
| 830 | _GRAPH_VARIABLES[graph] = object_identity.ObjectIdentityWeakSet() |
| 831 | _GRAPH_VARIABLES[graph].add(v) |
| 832 | |
| 833 | |
| 834 | def unique_object_name(name, |