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

[MXNET-173]fix acc metric shape miss match #10446

Merged
merged 4 commits into from
Apr 11, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
fix python2 division
  • Loading branch information
roywei committed Apr 10, 2018
commit 74404b95e0619231ec5bb22447581ef437a97c6d
2 changes: 1 addition & 1 deletion tests/python/unittest/test_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_acc_2d_label():
metric.update([label], [pred])
_, acc = metric.get()
expected_acc = (np.argmax(pred, axis=1).asnumpy() == label.asnumpy().ravel()).sum() / \
label.asnumpy().ravel().size
float(label.asnumpy().ravel().size)
assert acc == expected_acc

def test_f1():
Expand Down