"tests/git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "22371f00e22b9aad3c2754e2ff15e148541d26fc"
Unverified Commit ec4bd1e0 authored by shiyu1994's avatar shiyu1994 Committed by GitHub
Browse files

set is_linear_ to false when it is absent from the model file (fix #3778) (#4056)

parent e5c3f7e7
......@@ -698,6 +698,8 @@ Tree::Tree(const char* str, size_t* used_len) {
int is_linear_int;
Common::Atoi(key_vals["is_linear"].c_str(), &is_linear_int);
is_linear_ = static_cast<bool>(is_linear_int);
} else {
is_linear_ = false;
}
if ((num_leaves_ <= 1) && !is_linear_) {
......
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