@@ -7,6 +7,17 @@ using ChainRulesCore: NoTangent, ZeroTangent
77import ChainRulesCore
88
99
10+ # = utils ====================================================================
11+
12+ using MeasureBase: isneginf, isposinf
13+
14+ _isneginf_pullback (:: Any ) = (NoTangent (), ZeroTangent ())
15+ ChainRulesCore. rrule (:: typeof (isneginf), x) = isneginf (x), _logdensityof_rt_pullback
16+
17+ _isposinf_pullback (:: Any ) = (NoTangent (), ZeroTangent ())
18+ ChainRulesCore. rrule (:: typeof (isposinf), x) = isposinf (x), _isposinf_pullback
19+
20+
1021# = insupport & friends ======================================================
1122
1223using MeasureBase:
@@ -44,4 +55,12 @@ _check_dof_pullback(ΔΩ) = NoTangent(), NoTangent(), NoTangent()
4455ChainRulesCore. rrule (:: typeof (check_dof), ν, μ) = check_dof (ν, μ), _check_dof_pullback
4556
4657
58+ # = return type inference ====================================================
59+
60+ using MeasureBase: logdensityof_rt
61+
62+ _logdensityof_rt_pullback (:: Any ) = (NoTangent (), NoTangent (), ZeroTangent ())
63+ ChainRulesCore. rrule (:: typeof (logdensityof_rt), target, v) = logdensityof_rt (target, v), _logdensityof_rt_pullback
64+
65+
4766end # module MeasureBaseChainRulesCoreExt
0 commit comments