@thnkim it is because numpy’s RNG is not forkable.

  
      stackoverflow.com
  
  
      
    
  

  Seeding random number generators in parallel programs 123



  python, numpy, random, multiprocessing



  asked by
  
  
    overcomer
  
  on 05:59PM - 24 Apr 15


  
  
    
    
  
  


Instead, add this line to the top of your main script (and you need to use  python 3)
import torch
import torch.multiprocessing as mp
mp.set_start_method('spawn')