Unverified Commit 0701a32d authored by Arcs's avatar Arcs Committed by GitHub
Browse files

sync for init score of binary objective function (#4332)


Co-authored-by: default avatar未闲 <weixian.lzf@antfin.com>
parent 113b44d7
......@@ -152,6 +152,10 @@ class BinaryLogloss: public ObjectiveFunction {
suml += is_pos_(label_[i]);
}
}
if (Network::num_machines() > 1) {
suml = Network::GlobalSyncUpBySum(suml);
sumw = Network::GlobalSyncUpBySum(sumw);
}
double pavg = suml / sumw;
pavg = std::min(pavg, 1.0 - kEpsilon);
pavg = std::max<double>(pavg, kEpsilon);
......
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