Unverified Commit f660b5fe authored by Guolin Ke's avatar Guolin Ke Committed by GitHub
Browse files

disable `reg_sqrt` in huber loss

parent e5750f18
......@@ -262,10 +262,17 @@ class RegressionHuberLoss: public RegressionL2loss {
public:
explicit RegressionHuberLoss(const Config& config): RegressionL2loss(config) {
alpha_ = static_cast<double>(config.alpha);
if (sqrt_) {
Log::Warning("Cannot use sqrt transform in %s Regression, will auto disable it", GetName());
sqrt_ = false;
}
}
explicit RegressionHuberLoss(const std::vector<std::string>& strs): RegressionL2loss(strs) {
if (sqrt_) {
Log::Warning("Cannot use sqrt transform in %s Regression, will auto disable it", GetName());
sqrt_ = false;
}
}
~RegressionHuberLoss() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment