For real-valued tensors, I can understand providing grad_outputs in torch.autograd.grad, e.g. torch.autograd.grad(out, inp, grad_outputs=g) is like calculating the expression g^T @ jac(out, inp). What is the expression if all variables are complex?
N.B.: I also posted this question on AI StackExchange 2 because they have support for math expression.