Solved by pietern in post #2 
              
              
                If you don’t care for doing hogwild, the second example you list is not applicable to you. Everything is declared in the primary process because the model weights are to be shared (physically shared through shared memory) between the worker processes. 
If you want to simply use a single process per …