MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / track_tf_optimizer

Function track_tf_optimizer

tensorflow/python/keras/backend.py:815–821  ·  view source on GitHub ↗

Tracks the given TF optimizer for initialization of its variables.

(tf_optimizer)

Source from the content-addressed store, hash-verified

813
814
815def 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
824def track_variable(v):

Callers

nothing calls this directly

Calls 4

get_graphFunction · 0.85
executing_eagerlyMethod · 0.80
setdefaultMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected