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)
| 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. |
no test coverage detected