wonghang commented on issue #8658: mxnet random seed does not work for 
mx.init.Xavier on both CPU and GPU
URL: 
https://github.com/apache/incubator-mxnet/issues/8658#issuecomment-344501280
 
 
   I understand why mxnet went wrong:
   I am using python3 and hash randomization is enabled:
   
   In mxnet/python/mxnet/module/module.py
   
           attrs = self._symbol.attr_dict()
           for name, arr in self._arg_params.items():
               desc = InitDesc(name, attrs.get(name, None))
               _impl(desc, arr, arg_params)
   
           for name, arr in self._aux_params.items():
               desc = InitDesc(name, attrs.get(name, None))
               _impl(desc, arr, aux_params)
   
   should be replaced by:
   
           attrs = self._symbol.attr_dict()
           **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 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to