# Autograd in Flux

**URL:** <https://discourse.julialang.org/t/autograd-in-flux/56378>\
**Category:** General Usage\
**Created:** [March 3, 2021, 1:36am UTC](https://discourse.julialang.org/t/autograd-in-flux/56378 "2021-03-03T01:36:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![asyrov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asyrov/32/13578_2.png) [@asyrov](https://discourse.julialang.org/u/asyrov)\
**Post date:** [March 3, 2021, 1:50am UTC](https://discourse.julialang.org/t/autograd-in-flux/56378/2 "2021-03-03T01:50:18Z")

</div>

I guess this may help:

> [@Computing function Jacobian from Zygote.pullback](https://discourse.julialang.org/t/computing-function-jacobian-from-zygote-pullback/42979):
>
> Zygote [documentation on custom adjoints](https://fluxml.ai/Zygote.jl/dev/adjoints/#Pullbacks-1) states dx/dy (in the notation from the docs) is the Jacobian when x, y are vectors. I am struggling in relating this to an implementation. For a function f : R^N -\> R^M modeled with f = Chain(Dense(N, H, tanh), Dense(H, M)) with hidden dimension H, I intuitively thought dy/dx would be an MxN matrix, but as we all know intuition often fails so I experimented a bit. Running using Flux, Zygote N, M, H = 2, 3, 16 g = Chain(Dense(N, H, tanh), Dense(H, M)) x …

---

_[View the full topic](https://discourse.julialang.org/t/autograd-in-flux/56378)._
