Skip to content

Commit

Permalink
[fix] solver indexing of output blobs was incorrect for non-singleton
Browse files Browse the repository at this point in the history
outputs
  • Loading branch information
jeffdonahue committed Oct 1, 2014
1 parent 94927d2 commit ac8a03d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/caffe/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ void Solver<Dtype>::Test(const int test_net_id) {
LOG(INFO) << "Test loss: " << loss;
}
for (int i = 0; i < test_score.size(); ++i) {
const string& output_name = test_net->blob_names()[
test_net->output_blob_indices()[test_score_output_id[i]]];
const Dtype loss_weight =
test_net->blob_loss_weights()[test_net->output_blob_indices()[i]];
const int output_blob_index =
test_net->output_blob_indices()[test_score_output_id[i]];
const string& output_name = test_net->blob_names()[output_blob_index];
const Dtype loss_weight = test_net->blob_loss_weights()[output_blob_index];
ostringstream loss_msg_stream;
const Dtype mean_score = test_score[i] / param_.test_iter(test_net_id);
if (loss_weight) {
Expand Down

0 comments on commit ac8a03d

Please sign in to comment.