how to compute the first and second order derivatives

Hi all
How to comopute the first order and secong order derivatives of dsge model with respect to deep parameters?
Thanks a lot
How to comopute the first order and secong order derivatives of dsge model with respect to deep parameters?
Thanks a lot