From 1cd6fcb88a0fae9e6c54645843310ac8f7edf8cb Mon Sep 17 00:00:00 2001 From: J Yegerlehner Date: Wed, 19 Nov 2014 17:39:30 -0600 Subject: [PATCH] extract_features preserves feature shape --- tools/extract_features.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/extract_features.cpp b/tools/extract_features.cpp index f86ff96..364c436 100644 --- a/tools/extract_features.cpp +++ b/tools/extract_features.cpp @@ -147,9 +147,9 @@ int feature_extraction_pipeline(int argc, char** argv) { int dim_features = feature_blob->count() / batch_size; const Dtype* feature_blob_data; for (int n = 0; n < batch_size; ++n) { - datum.set_height(dim_features); - datum.set_width(1); - datum.set_channels(1); + datum.set_height(feature_blob->height()); + datum.set_width(feature_blob->width()); + datum.set_channels(feature_blob->channels()); datum.clear_data(); datum.clear_float_data(); feature_blob_data = feature_blob->cpu_data() + -- 2.7.4