posterior with one covariance per dimension and param gradient fix