Hessian by DL toolbox

9 views (last 30 days)
MAHSA YOUSEFI
MAHSA YOUSEFI on 27 Sep 2021
Commented: MAHSA YOUSEFI on 27 Sep 2021
Hi there.
In my Matlab code, I am using customize training loop for my algorithm, so I am using forward and dlgradient to create my loss and gradient models, and then taking them by dlfeval.
I am going to ask you, is there any way to calculate the Hessian model of the objective function (in my case softmax cross entropy) in the training loop? Something similar dlgradent, lets say.
Thank you...
  3 Comments
MAHSA YOUSEFI
MAHSA YOUSEFI on 27 Sep 2021
3.500,000 parameters totally and a dataset with 50,000 samples. For sure, yes! It would be a large matrix.
In my Algorithm, I have a subsampled Hessian (10,000 samples) multiply by a vectore.
MAHSA YOUSEFI
MAHSA YOUSEFI on 27 Sep 2021
Actually, if I find the way of computing Hessian, I can take some strategies to solve this problem, storing issue. I am going to do computations layer by layer. In this case, the size of Hessian matrix, depends on only to the number of that specific layter. So it would noy be too large if it is considered per layer.

Sign in to comment.

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!