From fb56a18109f069d13dccd49115d51629def5c426 Mon Sep 17 00:00:00 2001 From: yangyaming Date: Thu, 23 Nov 2017 11:39:48 +0800 Subject: [PATCH] Fix LaTeX equation for huber_loss_op.cc. --- paddle/operators/huber_loss_op.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/paddle/operators/huber_loss_op.cc b/paddle/operators/huber_loss_op.cc index 3435e74b0a..707ee60b6f 100644 --- a/paddle/operators/huber_loss_op.cc +++ b/paddle/operators/huber_loss_op.cc @@ -70,11 +70,15 @@ input value and Y as the target value. Huber loss can evaluate the fitness of X to Y. Different from MSE loss, Huber loss is more robust for outliers. The shape of X and Y are [batch_size, 1]. The equation is: -L_{\delta}(y, f(x)) = +$$ +Out_{\delta}(i, x, y) = \begin{cases} -0.5 * (y - f(x))^2, \quad |y - f(x)| \leq \delta \\ -\delta * (|y - f(x)| - 0.5 * \delta), \quad otherwise +0.5 * (Input(i, y) - Input(i, x))^2, +\quad |Input(i, y) - Input(i, x)| \leq \delta \\ +\delta * (|Input(i, y) - Input(i, x)| - 0.5 * \delta), +\quad otherwise \end{cases} +$$ )DOC"); } -- GitLab