summaryrefslogtreecommitdiff
path: root/tools/convert_imageset.cpp
diff options
context:
space:
mode:
authorMohamed Omran <mohamed.omran@gmail.com>2014-08-29 17:16:41 +0200
committerMohamed Omran <mohamed.omran@gmail.com>2014-08-31 14:05:51 +0200
commitc98ed3b8b2da44182551ed8c996c7102b9fec113 (patch)
treec3619a6c799a84ad38d7ae0c13a3cdd45c50a72f /tools/convert_imageset.cpp
parent4670c320b3539e9e55e60d6555fd1cf8d200e3e4 (diff)
downloadcaffeonacl-c98ed3b8b2da44182551ed8c996c7102b9fec113.tar.gz
caffeonacl-c98ed3b8b2da44182551ed8c996c7102b9fec113.tar.bz2
caffeonacl-c98ed3b8b2da44182551ed8c996c7102b9fec113.zip
minor changes to variable names and error messages + set default backed in convert_mnist_data.cpp to lmdb
Diffstat (limited to 'tools/convert_imageset.cpp')
-rw-r--r--tools/convert_imageset.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/convert_imageset.cpp b/tools/convert_imageset.cpp
index 416a1460..1c58f3de 100644
--- a/tools/convert_imageset.cpp
+++ b/tools/convert_imageset.cpp
@@ -102,7 +102,8 @@ int main(int argc, char** argv) {
LOG(INFO) << "Opening leveldb " << db_path;
leveldb::Status status = leveldb::DB::Open(
options, db_path, &db);
- CHECK(status.ok()) << "Failed to open leveldb " << db_path;
+ CHECK(status.ok()) << "Failed to open leveldb " << db_path
+ << ". Is it already existing?";
batch = new leveldb::WriteBatch();
} else if (db_backend == "lmdb") { // lmdb
LOG(INFO) << "Opening lmdb " << db_path;
@@ -116,7 +117,7 @@ int main(int argc, char** argv) {
CHECK_EQ(mdb_txn_begin(mdb_env, NULL, 0, &mdb_txn), MDB_SUCCESS)
<< "mdb_txn_begin failed";
CHECK_EQ(mdb_open(mdb_txn, NULL, 0, &mdb_dbi), MDB_SUCCESS)
- << "mdb_open failed";
+ << "mdb_open failed. Does the lmdb already exist? ";
} else {
LOG(FATAL) << "Unknown db backend " << db_backend;
}