Skip to content

Commit

Permalink
set num_threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Saurabh7 committed Jul 6, 2016
1 parent cef7ecc commit 133bf6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/unit/multiclass/BaggingMachine_unittest.cc
Expand Up @@ -50,6 +50,7 @@ TEST(BaggingMachine, mock_train)
NiceMock<MockCMachine> mm; mm.ref();
CMajorityVote* mv = new CMajorityVote();

bm->parallel->set_num_threads(1);
bm->set_machine(&mm);
bm->set_bag_size(bag_size);
bm->set_num_bags(num_bags);
Expand Down Expand Up @@ -188,6 +189,7 @@ TEST(BaggingMachine,classify_CART)
CMajorityVote* cv=new CMajorityVote();
cart->set_feature_types(ft);
CBaggingMachine* c=new CBaggingMachine(feats,labels);
c->parallel->set_num_threads(1);
c->set_machine(cart);
c->set_bag_size(14);
c->set_num_bags(10);
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/multiclass/tree/RandomForest_unittest.cc
Expand Up @@ -163,6 +163,7 @@ TEST(RandomForest,classify_nominal_test)
c->set_feature_types(ft);
CMajorityVote* mv = new CMajorityVote();
c->set_combination_rule(mv);
c->parallel->set_num_threads(1);
c->train(feats);

SGMatrix<float64_t> test(4,5);
Expand Down Expand Up @@ -232,6 +233,7 @@ TEST(RandomForest,classify_non_nominal_test)
c->set_feature_types(ft);
CMajorityVote* mv = new CMajorityVote();
c->set_combination_rule(mv);
c->parallel->set_num_threads(1);
c->train(feats);

SGMatrix<float64_t> test(4,5);
Expand Down

0 comments on commit 133bf6a

Please sign in to comment.