From 138d058ce75311044a544252af78ca98269c770a Mon Sep 17 00:00:00 2001 From: Bing Xu Date: Sun, 27 Sep 2015 20:12:44 -0600 Subject: [PATCH] remove logloss --- mshadow | 2 +- python/mxnet/metric.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mshadow b/mshadow index 8a117cca5ac7..decce9531b44 160000 --- a/mshadow +++ b/mshadow @@ -1 +1 @@ -Subproject commit 8a117cca5ac72601e8dbedd832b46bf19e0ae544 +Subproject commit decce9531b4493cd348c6fa4436b16cf508d9ce7 diff --git a/python/mxnet/metric.py b/python/mxnet/metric.py index 4f3cdba7fb1c..e3aa483b3cd6 100644 --- a/python/mxnet/metric.py +++ b/python/mxnet/metric.py @@ -1,4 +1,4 @@ -# pylint: disable=invalid-name +# pylint: disable=invalid-name, pointless-string-statement """Online evaluation metric module.""" from .base import string_types import numpy @@ -52,8 +52,9 @@ def update(self, label, pred): self.sum_metric += numpy.sum(py == label) self.num_inst += label.size +""" class LogLoss(EvalMetric): - """Calculate logloss""" + # remove because it because it is too slow def __init__(self): self.eps = 1e-15 super(LogLoss, self).__init__('logloss') @@ -68,6 +69,7 @@ def update(self, label, pred): p = max(min(p, 1 - self.eps), self.eps) self.sum_metric += -numpy.log(p) self.num_inst += label.size +""" class CustomMetric(EvalMetric): """Custom evaluation metric that takes a NDArray function. @@ -126,7 +128,5 @@ def create(metric): raise TypeError('metric should either be callable or str') if metric == 'acc' or metric == 'accuracy': return Accuracy() - elif metric == 'logloss': - return LogLoss() else: raise ValueError('Cannot find metric %s' % metric)