Fix typos

This commit is contained in:
Francois Chollet 2023-04-28 09:21:17 -07:00
parent 3edbba488a
commit da55728a35

@ -144,7 +144,7 @@ def categorical_accuracy(y_true, y_pred):
return matches return matches
@keras_core_export("keras_core.metrics.BinaryAccuracy") @keras_core_export("keras_core.metrics.CategoricalAccuracy")
class CategoricalAccuracy(reduction_metrics.MeanMetricWrapper): class CategoricalAccuracy(reduction_metrics.MeanMetricWrapper):
"""Calculates how often predictions match one-hot labels. """Calculates how often predictions match one-hot labels.
@ -157,7 +157,7 @@ class CategoricalAccuracy(reduction_metrics.MeanMetricWrapper):
operation that simply divides `total` by `count`. operation that simply divides `total` by `count`.
`y_pred` and `y_true` should be passed in as vectors of probabilities, `y_pred` and `y_true` should be passed in as vectors of probabilities,
rather than as labels. If necessary, use `tf.one_hot` to expand `y_true` as rather than as labels. If necessary, use `ops.one_hot` to expand `y_true` as
a vector. a vector.
If `sample_weight` is `None`, weights default to 1. If `sample_weight` is `None`, weights default to 1.