Relative Content

Tag Archive for matrixpytorchcovariancegaussian

PyTorch’s _PositiveDefinite() check failed on entire batch of 2×2 covariance matrices, but succeeded on all individual matrices?

I was wondering if any with experience with PyTorch rounding error or the PositiveDefinite check on the 2×2 covariance matrix could help me understand this issue better?
Error was that…
Exception has occurred: ValueError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Expected parameter covariance_matrix (Tensor of shape (117, 100, 20, 2, 2)) of distribution MultivariateNormal(loc: torch.Size([117, 100, 20, 2]), covariance_matrix: torch.Size([117, 100, 20, 2, 2])) to satisfy the constraint PositiveDefinite(), but found invalid values:…