Implementation of Distributions.rand is not compatible with Zygote due to mutable operation:
function Distributions.rand(rng::Random.AbstractRNG, d::TuringMvLogNormal, n::Int)
x = rand(rng, d.normal, n)
map!(exp,x, x)
return x
end
This works with with Zygote. But I am not sure how to multiplex this for Zygote only:
function Distributions.rand(rng::Random.AbstractRNG, d::TuringMvLogNormal, n::Int)
x = rand(rng, d.normal, n)
xp = map(exp,x)
return xp
end