Clarify how the strings 'accuracy', 'acc', 'crossentropy', 'ce' are interpreted in the compile API doc.

PiperOrigin-RevId: 285295606
Change-Id: I30e6120cd6303e0b5e9716c613006f09c302c67c
This commit is contained in:
Pavithra Vijay 2019-12-12 16:21:58 -08:00 committed by TensorFlower Gardener
parent 1aaabcd65f
commit 1f3044b02f

View File

@ -242,6 +242,12 @@ class Model(network.Network, version_utils.VersionSelector):
You can also pass a list (len = len(outputs)) of lists of metrics
such as `metrics=[['accuracy'], ['accuracy', 'mse']]` or
`metrics=['accuracy', ['accuracy', 'mse']]`.
When you pass the strings 'accuracy' or 'acc', we convert this to
one of `tf.keras.metrics.BinaryAccuracy`,
`tf.keras.metrics.CategoricalAccuracy`,
`tf.keras.metrics.SparseCategoricalAccuracy` based on the loss
function used and the model output shape. We do a similar conversion
for the strings 'crossentropy' and 'ce' as well.
loss_weights: Optional list or dictionary specifying scalar
coefficients (Python floats) to weight the loss contributions
of different model outputs.