Inside a Turing model, for some generated quantities, I’m doing rand(Normal(0.0,scale))
where “scale” is a parameter. I’m getting an error:
ERROR: LoadError: MethodError: no method matching randn(::Random._GLOBAL_RNG, ::Type{ReverseDiff.TrackedReal{Float64, Float64, Nothing}})
It appears that scale, being a TrackedReal, can’t be used this way? What do I do instead?
note: i tried doing randn() * scale
and that didn’t crash. is that the right thing? how do I sample from more complicated distributions (gamma, exponential, inverse gamma, lognormal etc anything from Distributions.jl)?