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.
This commit is contained in:
Ronghang Hu 2015-05-18 20:27:19 +08:00
Родитель 352aef4dab
Коммит 4ceefaaf71
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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) {