Add "a" parameter to softplus() #83
Following up the issues related to an exp link-function (https://github.com/TuringLang/Turing.jl/issues/2310), it reinforced the idea that a softplus link could actually be a good alternative. However, I feel like implementing its generalized version (#83) would be key (useful when modelling small parameters), so here my shot at it.
Add support for InverseFunctions / ChangesOfVariables
Can you clarify?
Kind bump
Sorry, I missed your previous comment.
Add support for InverseFunctions / ChangesOfVariables
Since this PR adds new functions, we should also add definitions of InverseFunctions.inverse to https://github.com/JuliaStats/LogExpFunctions.jl/blob/289114f535827c612ce10c01b8dec9d3a55e4d15/ext/LogExpFunctionsInverseFunctionsExt.jl and definitions of ChangesOfVariables.with_logabsdet_jacobian to https://github.com/JuliaStats/LogExpFunctions.jl/blob/289114f535827c612ce10c01b8dec9d3a55e4d15/ext/LogExpFunctionsChangesOfVariablesExt.jl. Additionally, we could add definitions of ChainRulesCore.frule and ChainRulesCore.rrule - but in principle AD should "just work" since all other involved functions are known to ChainRules.
I am not sure how to specify the ChangesofVariables one 🤔
Kind bump
Since there is no preexisting ChangesOfVariables.with_logabsdet_jacobian for softplus I'm really not sure what to write there