You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module MWE
import Enzyme
abstract type A end# Two copies of the same type.struct Normal1{T<:Real} <:A
σ::Tendstruct Normal2{T<:Real} <:A
σ::Tendlogpdf(d, x::Real) =log(d.σ) -0.5* (x)^2functionfunc(x)
dists = [Normal1{Float64}(1.0), Normal2{Float64}(1.0)]
returnsum(n ->logpdf(dists[n], x[n]), 1:2)
end
Enzyme.gradient(Enzyme.Forward, Enzyme.Const(func), [0.5, 0.7])
end
MWE:
Out:
On current main.
The text was updated successfully, but these errors were encountered: