File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -793,8 +793,16 @@ def evaluate(
793
793
Returns:
794
794
Scalar test loss (if the model has a single output and no metrics)
795
795
or list of scalars (if the model has multiple outputs
796
- and/or metrics). The attribute `model.metrics_names` will give you
797
- the display labels for the scalar outputs.
796
+ and/or metrics).
797
+
798
+ Note: When using compiled metrics, `evaluate()` may return multiple
799
+ submetric values, while `model.metrics_names` often lists only
800
+ top-level names (e.g., 'loss', 'compile_metrics'), leading to a
801
+ length mismatch. The order of the `evaluate()` output corresponds
802
+ to the order of metrics specified during `model.compile()`. You can
803
+ use this order to map the `evaluate()` results to the intended
804
+ metric. `model.metrics_names` itself will still return only the
805
+ top-level names.
798
806
"""
799
807
raise NotImplementedError
800
808
You can’t perform that action at this time.
0 commit comments