Log-density of .
If you want to get the gradient, just let each parameter be a gradient of that term.