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

Function decorated

tensorflow/python/keras/utils/metrics_utils.py:71–78  ·  view source on GitHub ↗

Decorated function with `add_update()`.

(metric_obj, *args, **kwargs)

Source from the content-addressed store, hash-verified

69 """
70
71 def decorated(metric_obj, *args, **kwargs):
72 """Decorated function with `add_update()`."""
73
74 with tf_utils.graph_context_for_symbolic_tensors(*args, **kwargs):
75 update_op = update_state_fn(*args, **kwargs)
76 if update_op is not None: # update_op will be None in eager execution.
77 metric_obj.add_update(update_op)
78 return update_op
79
80 return tf_decorator.make_decorator(update_state_fn, decorated)
81

Callers

nothing calls this directly

Calls 3

add_updateMethod · 0.80
identityMethod · 0.45
merge_callMethod · 0.45

Tested by

no test coverage detected