AlphaBetaGamma96:

Also, out of curiosity, how were you able to tell it’s a mul op in the stack trace that’s the error?


In the stack, you see THPFunction_apply which means it is entering the the python implementation of a custom Function.
Then you see <omitting python frames> that means that some python code is being run.
And then just above that at::Tensor::mul which means that the python code called into the mul operator.
Given that the python stack trace points to loss.backward()  in your file “pytorch_custom_determinant_example.py”, line 195.
So I think it is while the second backward that the failure happens? Or this is a single backprop?
Also I don’t think it is linked to the functional hessian function given that stack trace right?