Created
March 10, 2021 09:17
-
-
Save aussetg/834c7146b255d4924f931a0d50a60806 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DiffEqFlux | |
using Zygote | |
nn = FastChain((x,p) -> p) | |
p = rand(2, 2) | |
x = rand(1, 100) | |
function f(p) | |
gz, back = Zygote.pullback(z -> nn(z, p), x) | |
back(gz)[1] | |
end | |
y, back = Zygote.pullback(f, p) | |
back(y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment