提交 73ab2d46 编写于 作者: L Luo Tao

fix backward error of huber_regression_cost

上级 1c0a1a07
......@@ -644,7 +644,7 @@ void HuberRegressionLoss::backwardImp(Matrix& output,
if (std::abs(a) <= delta_)
grad[i] += -a;
else
grad[i] += a > 0 ? delta_ : -delta_;
grad[i] += a > 0 ? -delta_ : delta_;
}
if (useGpu_) outputG.copyFrom(grad, numSamples);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册