Here a quick scheme of my code:
input= x
f=model()   #our model is a fully connected architecture
output=f(input)

How can I get the gradient of output with relation to the model parameters ?
explanation: it’s a 1I vector, worth ∂ f(x)/ ∂ ωi
i  is the ith*  element of the vector
How can I get the jacobian of output with relation to the model parameters ?
explanation: it’s a matrix I * J, whoose element are:

I iterate trough the element of the matrix, while J iterate trough the element of the parameters
hint (maybe)
I found here some usefull function to computejacobian
How to compute Jacobian matrix in PyTorch? 47?
I have tried to derivate output w.r.t paramter param_to_vet()
myJacobian= Jacobian(output, nn.utils.param_to_vert(model.parameters()))

but result is none, maybe because param_to_vet() breaks the computationnal graph ?
Any idea how to compute jacobian wrt parameters  ?