# Is there an efficient way to compute the Hessian of a NN?

**URL:** <https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971>\
**Category:** Machine Learning\
**Tags:** flux\
**Created:** [July 30, 2019, 10:08am UTC](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971 "2019-07-30T10:08:33Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![stochastic\_guy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stochastic_guy/32/9877_2.png) [@stochastic\_guy](https://discourse.julialang.org/u/stochastic_guy)\
**Post date:** [August 27, 2019, 7:40pm UTC](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971/9 "2019-08-27T19:40:08Z")

</div>

Did you have any luck @HenriDeh ? I’m facing similar issues.

> [@\[Flux\] Issue while computing Hessian MethodError: objects of type Tracker.Grads are not callable](https://discourse.julialang.org/t/flux-issue-while-computing-hessian-methoderror-objects-of-type-tracker-grads-are-not-callable/27980):
>
> I’m new to Flux and I’m trying to compute the hessian. Here’s the code: grad = Flux.gradient(() -\> loss(x, y), Flux.params(model)) hess = Flux.gradient(grad, Flux.params(model)) But when running the line to compute hessian, it’s throwing the following error MethodError: objects of type Tracker.Grads are not callable

---

_[View the full topic](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971)._
