Skip to content

Commit 3305c87

Browse files
committed
Add more comment.
1 parent fb56a18 commit 3305c87

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

paddle/operators/huber_loss_op.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,18 @@ 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
7373
$$
74-
Out_{\delta}(i, x, y) =
74+
Out_{\delta}(X, Y)_i =
7575
\begin{cases}
76-
0.5 * (Input(i, y) - Input(i, x))^2,
77-
\quad |Input(i, y) - Input(i, x)| \leq \delta \\
78-
\delta * (|Input(i, y) - Input(i, x)| - 0.5 * \delta),
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),
7979
\quad otherwise
8080
\end{cases}
8181
$$
8282
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.
85+
8386
)DOC");
8487
}
8588
};

0 commit comments

Comments
 (0)