Hi all,
I’ve been trying to implement a variational GP dynamical system using GPyTorch.
I’m using the class VariationalLatentVariable to recover a variational approximation of the latent variable (approximation of q(x) ). For this reason, I need to define a prior over X. In my case, I am trying to define a Multivariate Normal Prior with mean = 0 and covariance matrix constructed using the RBF kernel which takes the time-data as inputs.
Unfortunately, as I try to define such prior distribution I get the following error:
“RuntimeError: Invalid expand arguments (98, -1, -1). Currently, repeat only works to create repeated batches of a 2D LazyTensor”
where 98 is the length of the data.
I’ve tried to convert the LazyTensor that is defined as covariance matrix into a torch.Tensor and use that to define the Multivariate Normal Prior, but the matrix appears not to be a positive semidefinite.
I’ve also tried to define the prior over X using a Multivariate Normal from gpytorch.distributions.MultivariateNormal, and the distribution is defined without problems, but in this case the issue comes later with the VariationalLatentVariable class that needs a gpytorch.priors.Prior as an input for the prior over X.
Anyone familiar with the GPyTorch library that has an idea on how I can get around this issue?
Any help will be much appreciated.
Cheers,
Andrea