# How to find jacobian of learnt neural network model

**URL:** https://discourse.julialang.org/t/how-to-find-jacobian-of-learnt-neural-network-model/83010
**Category:** Machine Learning
**Created:** [June 19, 2022, 12:34pm UTC](https://discourse.julialang.org/t/how-to-find-jacobian-of-learnt-neural-network-model/83010 "2022-06-19T12:34:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![umerzakheer](https://avatars.discourse-cdn.com/v4/letter/u/f9ae1b/32.png) [@umerzakheer](https://discourse.julialang.org/u/umerzakheer)
#### Post date: [June 19, 2022, 12:34pm UTC](https://discourse.julialang.org/t/how-to-find-jacobian-of-learnt-neural-network-model/83010/1 "2022-06-19T12:34:42Z")

</div>

I modelled a neural network with a vector as input and a vector as output (multi input multi output NN model). Now I want to find jacobian of the learnt function as:

 ![gradient](https://global.discourse-cdn.com/julialang/original/3X/1/c/1c248cde8d0f7df862eb8457bb5e3b1eaef4dde2.png)

Would anyone please guide me how to do this in Julia (Flux)?

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [June 19, 2022, 4:09pm UTC](https://discourse.julialang.org/t/how-to-find-jacobian-of-learnt-neural-network-model/83010/2 "2022-06-19T16:09:51Z")

</div>

That’s not a gradient, that’s the Jacobian of `f`. See `Zygote.jacobian`.
