summaryrefslogtreecommitdiff
path: root/tools/caffe.cpp
diff options
context:
space:
mode:
authorRonghang Hu <huronghang@hotmail.com>2015-05-18 20:27:19 +0800
committerRonghang Hu <huronghang@hotmail.com>2015-05-18 20:44:07 +0800
commit4ceefaaf7159110b6c815b7d50f64465787abf32 (patch)
tree8e767df279f76e32898ce08fc9d55a0a35e83f6e /tools/caffe.cpp
parent352aef4dabe273b5dfd2f206c3d631605d3744d3 (diff)
downloadcaffeonacl-4ceefaaf7159110b6c815b7d50f64465787abf32.tar.gz
caffeonacl-4ceefaaf7159110b6c815b7d50f64465787abf32.tar.bz2
caffeonacl-4ceefaaf7159110b6c815b7d50f64465787abf32.zip
fix blob_loss_weights index in test() in caffe.cpp
Correct the index for blob_loss_weights during output. Previously it was set to test_score index by mistake.
Diffstat (limited to 'tools/caffe.cpp')
-rw-r--r--tools/caffe.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/caffe.cpp b/tools/caffe.cpp
index 70b15f89..0b7523fc 100644
--- a/tools/caffe.cpp
+++ b/tools/caffe.cpp
@@ -187,8 +187,8 @@ int test() {
for (int i = 0; i < test_score.size(); ++i) {
const std::string& output_name = caffe_net.blob_names()[
caffe_net.output_blob_indices()[test_score_output_id[i]]];
- const float loss_weight =
- caffe_net.blob_loss_weights()[caffe_net.output_blob_indices()[i]];
+ const float loss_weight = caffe_net.blob_loss_weights()[
+ caffe_net.output_blob_indices()[test_score_output_id[i]]];
std::ostringstream loss_msg_stream;
const float mean_score = test_score[i] / FLAGS_iterations;
if (loss_weight) {