I am wondering if I have a pretrained generative, how to calculate the jacobian matrix of the output w.r.t. the input?
Have you read torch.autograd.functional.jacobian — PyTorch 1.11.0 documentation ?