You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by "wangwei (JIRA)" <ji...@apache.org> on 2015/12/29 10:25:49 UTC

[jira] [Resolved] (SINGA-35) Add random number generators

     [ https://issues.apache.org/jira/browse/SINGA-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

wangwei resolved SINGA-35.
--------------------------
    Resolution: Fixed
      Assignee: wangwei

This is done inside the Context Class SINGA-104.

> Add random number generators
> ----------------------------
>
>                 Key: SINGA-35
>                 URL: https://issues.apache.org/jira/browse/SINGA-35
>             Project: Singa
>          Issue Type: New Feature
>            Reporter: wangwei
>            Assignee: wangwei
>
> In SINGA-6, we added thread specific Singleton which is used to get a  Mshadow::Random object for each thread. Hence the random number generation is thead-safe if using Mshadow::Random and TSingleton.
> But for other places, we are still using rand() without seeding it. One problem is that two process would have the same random numbers if using rand(). One case is the AllReduce training. If two processes (each has one worker) are launched, then they would randomly skip the same number of training records because the ShardDataLayer uses rand() to get the skip number. In other words, the two workers' training are exactly the same. There is not difference (training time and accuracy) compared with non-distributed training. 
> A thread specific or global random number generator should be well initialized to avoid the above case. The thread specific generator can be passed to Mshadow for random distribution generation. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)