Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

proper flatten in acc #9619

Merged
merged 1 commit into from
Jan 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.flatten() == label.flatten()).sum().asscalar()
self.sum_metric += (pred_label.reshape((-1,)) == label.reshape((-1,))).sum().asscalar()
self.num_inst += numpy.prod(pred_label.shape)


Expand Down