DistributionsAD.jl
DistributionsAD.jl copied to clipboard
BroadcastedDistribution
Sometimes it is useful to have a broadcasted version of a distribution that is treated as a multivariate distribution. This is critical for performance when doing reverse AD using Tracker since we want to avoid scalar arithmetic. Defining an efficient adjoint for the BroadcastedDistribution will therefore lead to a significant improvement in speed.
I think it's relatively straightforward to make BroadcastedDistribution GPU compatible as well.