Uploaded image for project: 'Singa'
  1. Singa
  2. SINGA-35

Add random number generators

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            wangwei.cs wangwei
            wangwei.cs wangwei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: