Closed jlperla closed 2 years ago
And just to verify, it is important to create this as a MvNormal with a diagonal.
julia> MvNormal(Diagonal([0.1, 0.2])) |> typeof
ZeroMeanDiagNormal{Tuple{Base.OneTo{Int64}}} (alias for MvNormal{Float64, PDMats.PDiagMat{Float64, Array{Float64, 1}}, FillArrays.Zeros{Float64, 1, Tuple{Base.OneTo{Int64}}}})
Which has a very specialized type. If we wanted to backprop, then those tangent types should be easy as well.
After #100 we can cleanup the interface for the diagonal matrix.
TuringDiagMvNormal
distribution, which also serves no purpose and was a hack prior to custom rules. It is possible that the only change required in DSSM is https://github.com/HighDimensionalEconLab/DifferentiableStateSpaceModels.jl/blob/main/src/types.jl#L368 intoThen in that line, it becomes
(or something along those lines. The key is that it looks like the covariance matrix of the ZeroMeanDiagNormal is not stored as a diagonal.