You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> d =product_distribution(Normal.(randn(3), rand(3)))
DiagNormal(...)
julia>cov(d) isa Matrix
true
But we'd like to have cov(d) isa Diagonal, of course, so that cov doesn't blow up our memory for (very) large products of Normal (resp. a large diagonal MvNormal).
This happens because we currently define
cov(d::MvNormal) =Matrix(d.Σ)
(so cov will annoyingly also silently convert a GPU array to a CPU array). Do we have a better generic mechanism to turn an AbstractPDMat into a "normal matrix" that's not automatically a Matrix? We could introduce something like
Although that won't give you a Diagonal but whatever the covariance matrix is. I.e., an AbstractPDMat for MvNormal. IMO this is fine though since they are also optimized AbstractArrays.
Currently we have
But we'd like to have
cov(d) isa Diagonal
, of course, so thatcov
doesn't blow up our memory for (very) large products ofNormal
(resp. a large diagonalMvNormal
).This happens because we currently define
(so
cov
will annoyingly also silently convert a GPU array to a CPU array). Do we have a better generic mechanism to turn anAbstractPDMat
into a "normal matrix" that's not automatically aMatrix
? We could introduce something likeThe text was updated successfully, but these errors were encountered: