You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/04/23 19:22:04 UTC

[incubator-mxnet] branch master updated: Stop ignoring the given name of CompositeEvalMetric (#10635)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new e40ed88  Stop ignoring the given name of CompositeEvalMetric (#10635)
e40ed88 is described below

commit e40ed8898e368c6b4aa46107c9498ad3d7fd76c4
Author: Kenta Murata <mr...@users.noreply.github.com>
AuthorDate: Tue Apr 24 04:21:58 2018 +0900

    Stop ignoring the given name of CompositeEvalMetric (#10635)
    
    Before:
    
    ```
    >>> acc = mx.metric.CompositeEvalMetric(name='composite_xyz')
    >>> acc.name
    'composite'
    ```
    
    After:
    
    ```
    >>> acc = mx.metric.CompositeEvalMetric(name='composite_xyz')
    >>> acc.name
    'composite_xyz'
    ```
---
 python/mxnet/metric.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/mxnet/metric.py b/python/mxnet/metric.py
index 152cbc1..76118cc 100644
--- a/python/mxnet/metric.py
+++ b/python/mxnet/metric.py
@@ -263,7 +263,7 @@ class CompositeEvalMetric(EvalMetric):
     def __init__(self, metrics=None, name='composite',
                  output_names=None, label_names=None):
         super(CompositeEvalMetric, self).__init__(
-            'composite', output_names=output_names, label_names=label_names)
+            name, output_names=output_names, label_names=label_names)
         if metrics is None:
             metrics = []
         self.metrics = [create(i) for i in metrics]

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.