Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ NNlib = "0.9"
SpecialFunctions = "2"
SymbolicUtils = "3"
Symbolics = "6"
Zygote = "0.6"
Zygote = "0.6, 0.7"
julia = "1.10"
5 changes: 4 additions & 1 deletion src/chainrules.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ChainRulesCore: rrule, RuleConfig, ProjectTo, backing, @opt_out
import ChainRulesCore: rrule, RuleConfig, ProjectTo, backing, @opt_out, unthunk
using Base.Broadcast: broadcasted

function rrule(::Type{TaylorScalar}, v::T, p::NTuple{N, T}) where {N, T}
Expand Down Expand Up @@ -26,6 +26,9 @@ function rrule(::typeof(partials), t::TaylorScalar{T, N}) where {N, T}
function partials_pullback(::ZeroTangent)
NoTangent(), TaylorScalar(z, ntuple(j -> zero(T), Val(N)))
end
function partials_pullback(v̄::ChainRulesCore.AbstractThunk)
partials_pullback(unthunk(v̄))
end
return partials(t), partials_pullback
end

Expand Down
Loading