Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
ec4bd1e0
Unverified
Commit
ec4bd1e0
authored
Mar 13, 2021
by
shiyu1994
Committed by
GitHub
Mar 13, 2021
Browse files
set is_linear_ to false when it is absent from the model file (fix #3778) (#4056)
parent
e5c3f7e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/io/tree.cpp
src/io/tree.cpp
+2
-0
No files found.
src/io/tree.cpp
View file @
ec4bd1e0
...
...
@@ -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_
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment