Machine Learning, Pytorch.
gradient and Hessian of cross-entropy loss: For implementation, you have to come down from the the tower of Evolved Notation© and fill in the details. In PyTorch we can double check the result against autodiff engine: This uses “hessian” utility from Adam Paszke for autodiff and outer(p) for pp’ —