Ah! It works. I misunderstood - I thought that it didn’t matter whether to give the full covariance matrix or only the lower triangle, that it would end up doing the same thing. Turns out it’s crucial.
For those interested, I changed:
mvn1 = torch.distributions.MultivariateNormal(self.mu, self.covmats)
To:
mvn1 = torch.distributions.MultivariateNormal(self.mu, scale_tril=﻿torch.tril(self.covmats))
Thanks a lot!
Rob