In some cases, using MultivariateNormal distribution will throw errors RuntimeError: Lapack Error in potrf : the leading minor of order ... is not positive definite at ....
Here is a simple script to replicate the problem
import torch
from torch.autograd import Variable
import pyro
import pyro.distributions as dist
K = Variable(torch.rand((1000, 1000))).double()
K = K @ K.t()
y = Variable(torch.zeros(1000)).double()
z = pyro.sample("z", dist.MultivariateNormal(y, K))
In some cases, using
MultivariateNormaldistribution will throw errorsRuntimeError: Lapack Error in potrf : the leading minor of order ... is not positive definite at ....Here is a simple script to replicate the problem