Got marginals computed correctly. Now just need to do message passing, and migrate weights array to GPU memory for training