Skip to content

Instantly share code, notes, and snippets.

@Roger-luo
Created December 31, 2018 08:58
Show Gist options
  • Save Roger-luo/b67a1e326ba85da3a1d08da158f7bbc1 to your computer and use it in GitHub Desktop.
Save Roger-luo/b67a1e326ba85da3a1d08da158f7bbc1 to your computer and use it in GitHub Desktop.
using YAAD
using YAAD.TestUtils
x = Variable(rand(10, 10))
z = Variable(rand(10))
y = cos.(x) * sin.(z)
TestUtils.get_analytical_jacobian((x, z), y)
## get something from the middle
grad_output = rand(10)
backward(y, grad_output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment