We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 042560f commit e9cf749Copy full SHA for e9cf749
src/compiler/chainrules.jl
@@ -4,6 +4,7 @@
4
@inline ZygoteRules.unthunk_tangent(x::NTuple{N,<:Number}) where N = x
5
@inline ZygoteRules.unthunk_tangent(x::AbstractArray{<:Number,N}) where N = x
6
@inline ZygoteRules.unthunk_tangent(x::AbstractArray) = map(unthunk_tangent, x)
7
+@inline ZygoteRules.unthunk_tangent(r::Base.RefValue) = r[] = unthunk_tangent(r[])
8
ZygoteRules.unthunk_tangent(d::IdDict) = IdDict([unthunk_tangent(k) => unthunk_tangent(v) for (k, v) in d])
9
@non_differentiable unthunk_tangent(::IdDict)
10
0 commit comments