szha commented on a change in pull request #8006: fix example
URL: https://github.com/apache/incubator-mxnet/pull/8006#discussion_r141120202
##########
File path: example/multi-task/example_multi_task.py
##########
@@ -76,7 +79,13 @@ class Multi_Accuracy(mx.metric.EvalMetric):
"""Calculate accuracies of multi label"""
def __init__(self, num=None):
- super(Multi_Accuracy, self).__init__('multi-accuracy', num)
+ self.num = num
Review comment:
Parent constructor calls reset, which relies on self.num which doesn't exist
if I put it as the first line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services