class HuberLoss

class HuberLoss

Elementwise Huber loss defined as.

\[\begin{split} y_i= \left\{ \begin{array}{ll} | x^{(0)}_i - x^{(1)}_i | - \eplison & if \ \ | x^{(0)}_i - x^{(1)}_i | \ge \eplison \\ 0 & otherwise \end{array} \right. \end{split}\]
where \(d = x^{(0)}_i - x^{(1)}_i\).

Inputs:

  • N-D array.

  • N-D array.

Outputs:

  • N-D array.

Inputs:

  • N-D array.

  • N-D array.

Outputs:

  • N-D array.

Template Parameters:
  • T – Data type for computation.

  • T – Data type for computation.

Param delta:

\[\begin{split} y_i= \left\{ \begin{array}{ll} d^2 & (|d| < \delta)\\ \delta (2 |d| - \delta) & (otherwise) \end{array} \right. \end{split}\]
where \(d = x^{(0)}_i - x^{(1)}_i\).

Param delta: