Skip to content

Commit

Permalink
Revert "proper flatten in acc (apache#9619)"
Browse files Browse the repository at this point in the history
This reverts commit ed823b2.
  • Loading branch information
szha committed Feb 7, 2018
1 parent 5d4f0d2 commit 35d7654
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/mxnet/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def update(self, labels, preds):
if pred_label.context != label.context:
pred_label = pred_label.as_in_context(label.context)

self.sum_metric += (pred_label.reshape((-1,)) == label.reshape((-1,))).sum().asscalar()
self.sum_metric += (pred_label.flatten() == label.flatten()).sum().asscalar()
self.num_inst += numpy.prod(pred_label.shape)


Expand Down

0 comments on commit 35d7654

Please sign in to comment.