fix backward error of huber_regression_cost

revert-3824-remove_grad_op_type
Luo Tao 8 years ago
parent 1c0a1a076d
commit 73ab2d4678

@ -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);
}

Loading…
Cancel
Save