Implement Differentiable for distriution classes