Merge pull request #40396 from tensorflow:jvishnuvardhan-patch-1
PiperOrigin-RevId: 316149354 Change-Id: Ia9399955a4c987b50fac488438fa724118dcc949
This commit is contained in:
commit
2bc49eade6
|
@ -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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue