MCPcopy Create free account
hub / github.com/tensorflow/models / process_metrics

Method process_metrics

official/core/base_task.py:194–208  ·  view source on GitHub ↗

Process and update metrics. Called when using custom training loop API. Args: metrics: a nested structure of metrics objects. The return of function self.build_metrics. labels: a tensor or a nested structure of tensors. model_outputs: a tensor or a nested structur

(self, metrics, labels, model_outputs, **kwargs)

Source from the content-addressed store, hash-verified

192 return []
193
194 def process_metrics(self, metrics, labels, model_outputs, **kwargs):
195 """Process and update metrics.
196
197 Called when using custom training loop API.
198
199 Args:
200 metrics: a nested structure of metrics objects. The return of function
201 self.build_metrics.
202 labels: a tensor or a nested structure of tensors.
203 model_outputs: a tensor or a nested structure of tensors. For example,
204 output of the keras model built by self.build_model.
205 **kwargs: other args.
206 """
207 for metric in metrics:
208 metric.update_state(labels, model_outputs)
209
210 def process_compiled_metrics(self, compiled_metrics, labels, model_outputs):
211 """Process and update compiled_metrics.

Callers 3

train_stepMethod · 0.95
validation_stepMethod · 0.95
joint_train_stepMethod · 0.45

Calls 1

update_stateMethod · 0.45

Tested by

no test coverage detected