File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ julia> t()()
4545### When to `@thunk`?
4646When writing `rrule`s (and to a lesser exent `frule`s), it is important to `@thunk`
4747appropriately.
48- Propagation rule's that return multiple derivatives may not hae all deriviatives used.
48+ Propagation rules that return multiple derivatives may not have all deriviatives used.
4949 By `@thunk`ing the work required for each derivative, they then compute only what is needed.
5050
51- #### How to thunks prevent work?
51+ #### How do thunks prevent work?
5252If we have `res = pullback(...) = @thunk(f(x)), @thunk(g(x))`
5353then if we did `dx + res[1]` then only `f(x)` would be evaluated, not `g(x)`.
5454Also if we did `Zero() * res[1]` then the result would be `Zero()` and `f(x)` would not be evaluated.
You can’t perform that action at this time.
0 commit comments