# How to find jacobian of neural network model for current variables only and not history variables

**URL:** https://discourse.julialang.org/t/how-to-find-jacobian-of-neural-network-model-for-current-variables-only-and-not-history-variables/84161
**Category:** Specific Domains
**Tags:** machine-learning
**Created:** [July 13, 2022, 11:10am UTC](https://discourse.julialang.org/t/how-to-find-jacobian-of-neural-network-model-for-current-variables-only-and-not-history-variables/84161 "2022-07-13T11:10:32Z")
**Posts on this page:** 1
**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: [July 13, 2022, 11:10am UTC](https://discourse.julialang.org/t/how-to-find-jacobian-of-neural-network-model-for-current-variables-only-and-not-history-variables/84161/1 "2022-07-13T11:10:32Z")

</div>

My data for training neural network model contains current variables and also history variables to find best fit for non-linear function. Training perfomance is very good and model can predict data with very low error.

My main goal is to find tangent for the learnt model. I am using  
f(array of input parameters both current and history variables) = NN\_model  
Zygote.jacobian(f,[array of input parameters both current and history variables])  
function to find tangent. This does not give results as expected. I want to find jacobian with respect to current variables only.  
Zygote.jacobian(f,[array of only parameters current]) → this gives error  
Would it be possible with Zygote package or any other recommendations please?
