Skip to content

Commit 98700ce

Browse files
authored
Merge pull request #5867 from pkuyym/fix-5865
Fix LaTeX equation for huber_loss_op.cc.
2 parents c077a6d + 3305c87 commit 98700ce

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

paddle/operators/huber_loss_op.cc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,18 @@ input value and Y as the target value. Huber loss can evaluate the fitness of
7070
X to Y. Different from MSE loss, Huber loss is more robust for outliers. The
7171
shape of X and Y are [batch_size, 1]. The equation is:
7272
73-
L_{\delta}(y, f(x)) =
73+
$$
74+
Out_{\delta}(X, Y)_i =
7475
\begin{cases}
75-
0.5 * (y - f(x))^2, \quad |y - f(x)| \leq \delta \\
76-
\delta * (|y - f(x)| - 0.5 * \delta), \quad otherwise
76+
0.5 * (Y_i - X_i)^2,
77+
\quad |Y_i - X_i| \leq \delta \\
78+
\delta * (|Y_i - X_i| - 0.5 * \delta),
79+
\quad otherwise
7780
\end{cases}
81+
$$
82+
83+
In the above equation, $Out_\delta(X, Y)_i$, $X_i$ and $Y_i$ represent the ith
84+
element of Out, X and Y.
7885
7986
)DOC");
8087
}

0 commit comments

Comments
 (0)