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

Method _get_existing_metric

tensorflow/python/keras/engine/base_layer.py:1865–1873  ·  view source on GitHub ↗
(self, name=None)

Source from the content-addressed store, hash-verified

1863 self._name = name
1864
1865 def _get_existing_metric(self, name=None):
1866 match = [m for m in self._metrics if m.name == name]
1867 if not match:
1868 return
1869 if len(match) > 1:
1870 raise ValueError(
1871 'Please provide different names for the metrics you have added. '
1872 'We found {} metrics with the name: "{}"'.format(len(match), name))
1873 return match[0]
1874
1875 def _eager_add_metric(self, value, aggregation=None, name=None):
1876 # If the given metric is available in `metrics` list we just update state

Callers 2

_eager_add_metricMethod · 0.95
_symbolic_add_metricMethod · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected