sparse categorical acc should have the same result as categorical acc.
For example, with 3 classes, given sparse_true_label = [0, 1, 1], it's equivalent in categorical labels is dense_true_label = [[1, 0, 0], [0, 1, 0], [0, 1, 0]]. With the same predictions
Summary
Fix https://github.com/awslabs/keras-apache-mxnet/issues/165
Related Issues
https://github.com/awslabs/keras-apache-mxnet/issues/165
PR Overview
For example, with 3 classes, given
sparse_true_label = [0, 1, 1]
, it's equivalent in categorical labels isdense_true_label = [[1, 0, 0], [0, 1, 0], [0, 1, 0]]
. With the same predictionsThey should produce the same acc which is
[1, 0 ,1]
max
is used, but it should directly compare withy_true