Skip to content

Commit 46c6392

Browse files
committed
fix issue #57
1 parent 2e24670 commit 46c6392

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/FedTree/FL/FLtrainer.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,7 @@ void FLtrainer::horizontal_fl_trainer(vector<Party> &parties, Server &server, FL
201201
for (int i = 0; i < params.gbdt_param.n_trees; i++) {
202202
LOG(INFO) << "Training round " << i << " start";
203203
int n_tree_this_round;
204-
if(params.gbdt_param.bagging)
205-
n_tree_this_round = params.gbdt_param.n_parallel_trees;
206-
else
207-
n_tree_this_round = params.gbdt_param.tree_per_round;
204+
n_tree_this_round = params.gbdt_param.tree_per_round;
208205
vector<Tree> trees_this_round;
209206
trees_this_round.resize(n_tree_this_round);
210207
// each party sample the data to train a tree in each round
@@ -510,10 +507,7 @@ void FLtrainer::vertical_fl_trainer(vector<Party> &parties, Server &server, FLPa
510507
for (int round = 0; round < params.gbdt_param.n_trees; round++) {
511508
LOG(INFO) << "Training round " << round << " start";
512509
int n_tree_this_round;
513-
if(params.gbdt_param.bagging)
514-
n_tree_this_round = params.gbdt_param.n_parallel_trees;
515-
else
516-
n_tree_this_round = params.gbdt_param.tree_per_round;
510+
n_tree_this_round = params.gbdt_param.tree_per_round;
517511
vector<Tree> trees(n_tree_this_round);
518512

519513
if(params.ins_bagging_fraction < 1.0){

0 commit comments

Comments
 (0)