You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/02/07 02:43:07 UTC

[GitHub] ZiyueHuang commented on a change in pull request #9697: fix NAG if multi_precision = true

ZiyueHuang commented on a change in pull request #9697: fix NAG if multi_precision = true
URL: https://github.com/apache/incubator-mxnet/pull/9697#discussion_r166505544
 
 

 ##########
 File path: tests/python/unittest/test_optimizer.py
 ##########
 @@ -357,6 +357,118 @@ def test_std_sparse_sgd():
                                           w_stype='row_sparse', g_stype='row_sparse')
 
 
+class PyNAG(PySGD):
+    def __init__(self, **kwargs):
+        super(PyNAG, self).__init__(**kwargs)
 
 Review comment:
   I think PySGD in test is appropriate for PyNAG to inherit. In SGD, _update_impl is responsible for the actual update (update and update_multi_precission both call this function). In PySGD, update is responsible for the actual update. So in PyNAG, overriding update function of PySGD is ok. This inheritance would make the impletation less verbose in test.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services