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 bf36147 commit 10ec1aeCopy full SHA for 10ec1ae
src/functor.jl
@@ -60,6 +60,7 @@ function fmap(f, x; cache = IdDict())
60
haskey(cache, x) && return cache[x]
61
cache[x] = isleaf(x) ? f(x) : fmap1(x -> fmap(f, x, cache = cache), x)
62
end
63
+
64
# Allow gradients and other constructs that match the structure of the functor
65
# to allow for `map` style computations and return a modified version of the struct.
66
# This way we can use `fmap` to update the params with their gradients
0 commit comments