Unverified Commit cd70bad4 authored by guanqun's avatar guanqun Committed by GitHub
Browse files

fix a bug when we set the default score (#3114)

parent 74e5ec4b
...@@ -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
......
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