Hi,
Just as a first point, MSELoss already uses multithreading to speed up computation on multi-core machines. Why is this necessary for you?
I guess the problem is that in a multiprocess environment the out that is given to your child process is not the same as the one in your main process. So you only modify the one local to the other process and not the one from your main process.