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
return y, (; ex=ex) # use a NamedTuple for the intermediates
166
+
ex =exp(x)
167
+
y = ex / (1+ ex)
168
+
return y, (; ex=ex) # use a NamedTuple for the intermediates
169
169
end
170
170
171
171
pullback_at(::typeof(σ), x, y, ȳ, intermediates) = ȳ * y / (1+ intermediates.ex)
@@ -189,8 +189,8 @@ And storing all these things on the tape — inputs, outputs, sensitivities, int
189
189
What if we generalized the idea of the `intermediate` named tuple, and had `augmented_primal` return a struct that just held anything we might want put on the tape.
Copy file name to clipboardexpand all lines: docs/src/design/many_tangents.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Structural tangents are derived from the structure of the input.
45
45
Either automatically, as part of the AD, or manually, as part of a custom rule.
46
46
47
47
Consider the structure of `DateTime`:
48
-
```julia
48
+
```julia-repl
49
49
julia> dump(now())
50
50
DateTime
51
51
instant: UTInstant{Millisecond}
@@ -83,15 +83,15 @@ Where there is no natural tangent type for the outermost type but there is for s
83
83
84
84
Consider if we had a representation of a country's GDP as output by some continuous time model like a Gaussian Process, where that representation is as a sequence of `TimeSample`s
Copy file name to clipboardexpand all lines: docs/src/rule_author/converting_zygoterules.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Converting ZygoteRules.@adjoint to `rrule`s
1
+
# Converting `ZygoteRules.@adjoint` to `rrule`s
2
2
3
3
[ZygoteRules.jl](https://github.com/FluxML/ZygoteRules.jl) is a legacy package similar to ChainRulesCore but supporting [Zygote.jl](https://github.com/FluxML/Zygote.jl) only.
0 commit comments