From 84897d85853244c525ec1ff675a94bbd5e1ad26d Mon Sep 17 00:00:00 2001 From: J Yegerlehner Date: Wed, 19 Nov 2014 17:39:30 -0600 Subject: [PATCH] Preserve shape of extracted features. --- 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 ddbce1075ed..8b1f9e8880e 100644 --- a/tools/extract_features.cpp +++ b/tools/extract_features.cpp @@ -146,9 +146,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() +