Skip to content

Commit

Permalink
fix forward loss computation
Browse files Browse the repository at this point in the history
  • Loading branch information
s9xie committed Mar 16, 2016
1 parent 5eb9499 commit 9e74dd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ void SigmoidCrossEntropyLossLayer<Dtype>::Forward_cpu(
for (int i = 0; i < num; ++i) {
temp_loss_pos = 0;
temp_loss_neg = 0;
count_pos = 0;
count_neg = 0;
for (int j = 0; j < dim; j ++) {
if (target[i*dim+j] == 1) {
count_pos ++;
Expand Down

0 comments on commit 9e74dd7

Please sign in to comment.