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/01 05:07:00 UTC

[GitHub] szha closed pull request #9658: Ensure deterministic initialization order w/ Python3 in Module

szha closed pull request #9658: Ensure deterministic initialization order w/ Python3 in Module
URL: https://github.com/apache/incubator-mxnet/pull/9658
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/module/module.py b/python/mxnet/module/module.py
index 73895c175f..1cf70402ce 100644
--- a/python/mxnet/module/module.py
+++ b/python/mxnet/module/module.py
@@ -303,11 +303,11 @@ def _impl(name, arr, cache):
                 initializer(name, arr)
 
         attrs = self._symbol.attr_dict()
-        for name, arr in self._arg_params.items():
+        for name, arr in sorted(self._arg_params.items()):
             desc = InitDesc(name, attrs.get(name, None))
             _impl(desc, arr, arg_params)
 
-        for name, arr in self._aux_params.items():
+        for name, arr in sorted(self._aux_params.items()):
             desc = InitDesc(name, attrs.get(name, None))
             _impl(desc, arr, aux_params)
 


 

----------------------------------------------------------------
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