Normal distribution only works for 1-dimensional distributions, what you need is MultivariateNormal which is located here Probability distributions - torch.distributions — PyTorch 1.10.0 documentation