Skip to content

Commit

Permalink
fix the bug with db_type when the number of features to be extracted …
Browse files Browse the repository at this point in the history
…is larger than 1
norouzi committed May 27, 2015
1 parent 9ea3da4 commit e1cc9d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/extract_features.cpp
Original file line number Diff line number Diff line change
@@ -122,9 +122,10 @@ int feature_extraction_pipeline(int argc, char** argv) {

std::vector<shared_ptr<db::DB> > feature_dbs;
std::vector<shared_ptr<db::Transaction> > txns;
const char* db_type = argv[++arg_pos];
for (size_t i = 0; i < num_features; ++i) {
LOG(INFO)<< "Opening dataset " << dataset_names[i];
shared_ptr<db::DB> db(db::GetDB(argv[++arg_pos]));
shared_ptr<db::DB> db(db::GetDB(db_type));
db->Open(dataset_names.at(i), db::NEW);
feature_dbs.push_back(db);
shared_ptr<db::Transaction> txn(db->NewTransaction());

0 comments on commit e1cc9d3

Please sign in to comment.