# \#hessian

**URL:** https://discourse.julialang.org/tag/hessian/1119.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Calculation of Hessian of a loss function w.r.t. dense layer weight matrices](https://discourse.julialang.org/t/calculation-of-hessian-of-a-loss-function-w-r-t-dense-layer-weight-matrices/103697)

<div class="topic-metadata">

**Author:** [@Harsh\_Choudhary](https://discourse.julialang.org/u/Harsh_Choudhary)\
**Replies:** 0\
**Last updated:** [September 9, 2023, 7:23am UTC](https://discourse.julialang.org/t/calculation-of-hessian-of-a-loss-function-w-r-t-dense-layer-weight-matrices/103697 "2023-09-09T07:23:51Z")

</div>

Hi, I am trying to train a dummy Neural Net which is given as: y = transpose(W1)sigmoid(W2x) where W1 and W2 are 10x1 and x is a scalar input. I am using second-order optimization and for that purpose, I need to calculat…

---

## [Second order derivatives with ChainRules](https://discourse.julialang.org/t/second-order-derivatives-with-chainrules/103606)

<div class="topic-metadata">

**Author:** [@mariusd](https://discourse.julialang.org/u/mariusd)\
**Replies:** 1\
**Last updated:** [September 7, 2023, 1:48pm UTC](https://discourse.julialang.org/t/second-order-derivatives-with-chainrules/103606 "2023-09-07T13:48:54Z")

</div>

How can I get the second order derivarive of a function using ChainRules? Bellow is my approach for the sin function. See the following code: using ChainRules using ChainRulesCore # from the docs, first derivative of …

---

## [Fast Hessian and Gradient for PINNS using Enzyme/Zygote](https://discourse.julialang.org/t/fast-hessian-and-gradient-for-pinns-using-enzyme-zygote/101993)

<div class="topic-metadata">

**Author:** [@Baba\_Yara\_Fahiz](https://discourse.julialang.org/u/Baba_Yara_Fahiz)\
**Replies:** 0\
**Last updated:** [July 23, 2023, 11:41pm UTC](https://discourse.julialang.org/t/fast-hessian-and-gradient-for-pinns-using-enzyme-zygote/101993 "2023-07-23T23:41:34Z")

</div>

I am working on a problem that involves solving partial differential equations using neural networks. The current bottleneck in my code is computing the gradient and Hessian of batched data. My current implementation us…

---

## [Efficiently computing Hessians of Neural Networks output with respect to inputs](https://discourse.julialang.org/t/efficiently-computing-hessians-of-neural-networks-output-with-respect-to-inputs/101666)

<div class="topic-metadata">

**Author:** [@Baba\_Yara\_Fahiz](https://discourse.julialang.org/u/Baba_Yara_Fahiz)\
**Replies:** 1\
**Last updated:** [July 16, 2023, 5:29am UTC](https://discourse.julialang.org/t/efficiently-computing-hessians-of-neural-networks-output-with-respect-to-inputs/101666 "2023-07-16T05:29:44Z")

</div>

Hello everyone, I’m currently working on a problem that involves approximating a partial differential equation using neural networks. I’ve created a script that generates a set of neural networks, computes their outputs…

---

## [ForwardDiff.jl : ERROR: LoadError: MethodError: convert(...) is ambiguous](https://discourse.julialang.org/t/forwarddiff-jl-error-loaderror-methoderror-convert-is-ambiguous/86132)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 4\
**Last updated:** [August 23, 2022, 7:10am UTC](https://discourse.julialang.org/t/forwarddiff-jl-error-loaderror-methoderror-convert-is-ambiguous/86132 "2022-08-23T07:10:50Z")

</div>

My original intention was to use Zygote to achieve the gradient of gradients, but there were a lot of problems with twice automatic differentiation in reverse mode. So I used Zygote.hessian to achieve the mixing forward…
