@hughperkins  Well, I’m trying to train an agent with an evolutionary algorithm (CMA-ES in my case). In order to evaluate the fitness of the potential solution for the parameters of the model (a simple linear combination or 2 linear layers max), I have to run the environment which is CPU bound. So to do the evaluation “efficiently”, I spawn many processes to evaluate multiple solutions at a time.
PyTorch is probably overkill to run such simple models, but it was easier for me to implement !
Also, I have 2 relatively “big” models (VAE, LSTM) that I have to pass to the child process, but shared memory is completely ok for these 2.