summaryrefslogtreecommitdiff
path: root/tools/extract_features.cpp
diff options
context:
space:
mode:
authorMohammad Norouzi <mohammad.n@gmail.com>2015-05-26 17:25:56 -0400
committerMohammad Norouzi <mohammad.n@gmail.com>2015-05-26 17:25:56 -0400
commit9ea3da42fec3d1ec54de7ad064ae5070cdede524 (patch)
tree5ad48c13ddcc7b9f17761c0fc1c8ff841d33c521 /tools/extract_features.cpp
parent2c69258d510d8e7d412d2249c3e057870f141871 (diff)
downloadcaffeonacl-9ea3da42fec3d1ec54de7ad064ae5070cdede524.tar.gz
caffeonacl-9ea3da42fec3d1ec54de7ad064ae5070cdede524.tar.bz2
caffeonacl-9ea3da42fec3d1ec54de7ad064ae5070cdede524.zip
add leading zeros to keys in feature DB files
Diffstat (limited to 'tools/extract_features.cpp')
-rw-r--r--tools/extract_features.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/extract_features.cpp b/tools/extract_features.cpp
index 364c436d..1ffbfbed 100644
--- a/tools/extract_features.cpp
+++ b/tools/extract_features.cpp
@@ -157,7 +157,7 @@ int feature_extraction_pipeline(int argc, char** argv) {
for (int d = 0; d < dim_features; ++d) {
datum.add_float_data(feature_blob_data[d]);
}
- int length = snprintf(key_str, kMaxKeyStrLength, "%d",
+ int length = snprintf(key_str, kMaxKeyStrLength, "%010d",
image_indices[i]);
string out;
CHECK(datum.SerializeToString(&out));