I tried to write data to the lmdb database (referenced caffe / tools / convert_imageset.cpp). There were no errors in the console, but the .mdb file size remains equal to zero. If no data is written to the file, a data and lock file is created. Part of the code I tried is:
scoped_ptr<db::DB> db(db::GetDB("lmdb"));
db->Open(argv[3], db::NEW);
scoped_ptr<db::Transaction> txn(db->NewTransaction());
datum.SerializeToString(&out);
txn->Put(key1, out);
txn->Commit();
I could not understand if something was missing. Any links to how LMBD works will be helpful.
source
share