Merge pull request #40396 from tensorflow:jvishnuvardhan-patch-1

PiperOrigin-RevId: 316149354
Change-Id: Ia9399955a4c987b50fac488438fa724118dcc949
This commit is contained in:
TensorFlower Gardener 2020-06-12 12:11:14 -07:00
commit 2bc49eade6
1 changed files with 1 additions and 1 deletions

View File

@ -1238,7 +1238,7 @@ def mean_absolute_error(y_true, y_pred):
def mean_absolute_percentage_error(y_true, y_pred): def mean_absolute_percentage_error(y_true, y_pred):
"""Computes the mean absolute percentage error between `y_true` and `y_pred`. """Computes the mean absolute percentage error between `y_true` and `y_pred`.
`loss = 100 * mean(abs(y_true - y_pred) / y_true, axis=-1)` `loss = 100 * mean(abs((y_true - y_pred) / y_true), axis=-1)`
Standalone usage: Standalone usage: