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
cd70bad4
Unverified
Commit
cd70bad4
authored
May 25, 2020
by
guanqun
Committed by
GitHub
May 25, 2020
Browse files
fix a bug when we set the default score (#3114)
parent
74e5ec4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/boosting/score_updater.hpp
src/boosting/score_updater.hpp
+1
-1
No files found.
src/boosting/score_updater.hpp
View file @
cd70bad4
...
@@ -29,7 +29,7 @@ class ScoreUpdater {
...
@@ -29,7 +29,7 @@ class ScoreUpdater {
int64_t
total_size
=
static_cast
<
int64_t
>
(
num_data_
)
*
num_tree_per_iteration
;
int64_t
total_size
=
static_cast
<
int64_t
>
(
num_data_
)
*
num_tree_per_iteration
;
score_
.
resize
(
total_size
);
score_
.
resize
(
total_size
);
// default start score is zero
// default start score is zero
std
::
memset
(
score_
.
data
(),
'0'
,
total_size
*
sizeof
(
double
));
std
::
memset
(
score_
.
data
(),
0
,
total_size
*
sizeof
(
double
));
has_init_score_
=
false
;
has_init_score_
=
false
;
const
double
*
init_score
=
data
->
metadata
().
init_score
();
const
double
*
init_score
=
data
->
metadata
().
init_score
();
// if exists initial score, will start from it
// if exists initial score, will start from it
...
...
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