I'd like to add an implementation of a multivariate normal distribution with non-diagonal covariance (unless I'm mistaken, we don't yet have one of these in either the probtorch repo or in Pyro).
The main question is how we would like to parameterize it. I don't believe there is a multivariate normal in tf.distributions, rather just in tf.contrib.distributions (at least, according to the r1.4 API docs). The two most useful parameterizations are likely:
but also potentially interesting is the low-rank + diagonal option MultivariateNormalDiagPlusLowRank. As a first pass, though, I will ignore this, and require passing either a full covariance matrix or a lower-triangular decomposition. Looking at the design doc, do we have a consensus on how to handle different parameterizations for the same distribution?
For all of these, for a D-dimensional distribution they permit passing D x D e.g. covariance matrices, or batch_size x D x D tensors for when the covariance varies across the batch. I believe this should work for us as well.
I'd like to add an implementation of a multivariate normal distribution with non-diagonal covariance (unless I'm mistaken, we don't yet have one of these in either the
probtorchrepo or in Pyro).The main question is how we would like to parameterize it. I don't believe there is a multivariate normal in
tf.distributions, rather just intf.contrib.distributions(at least, according to the r1.4 API docs). The two most useful parameterizations are likely:but also potentially interesting is the low-rank + diagonal option MultivariateNormalDiagPlusLowRank. As a first pass, though, I will ignore this, and require passing either a full covariance matrix or a lower-triangular decomposition. Looking at the design doc, do we have a consensus on how to handle different parameterizations for the same distribution?
For all of these, for a D-dimensional distribution they permit passing
D x De.g. covariance matrices, orbatch_size x D x Dtensors for when the covariance varies across the batch. I believe this should work for us as well.