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
functionprod2(xs::Vector)
p =one(eltype(xs))
for x in xs
p = p * x
p ==0&&break# exit early once you know the answerend
p
end
ChainRulesCore.@non_differentiableeltype(::Any)
functionmain()
x =rand(3)
Yota.grad(prod2, x)
_, tape =trace(prod2, x; ctx=GradCtx())
end