tpapp / LogDensityProblemsAD.jl

AD backends for LogDensityProblems.jl.
MIT License
12 stars 6 forks source link

Allow specify input for reversediff compile #22

Closed sunxd3 closed 1 year ago

sunxd3 commented 1 year ago

By default, compilation of ReverseDiff uses zeros as input, but this can cause incorrect compile tape given other inputs. The PR allows user to specify inputs with ADTypes' AutoReverseDiff.

devmotion commented 1 year ago

I'm not sure if this is a good idea, the main point of the ADTypes extension is to allow users to pass around all information in form of the types from ADTypes. To me the main point is to not have to specify keyword arguments - otherwise you could also just use ADgradient.

I also think that the Turing issue that motivated this PR should be fixed in a different way in Turing, to avoid that users have to deal with this problem.

sunxd3 commented 1 year ago

Make sense to me