hopsy.Model.log_gradient#
- Model.log_gradient(self, x)#
For some proposals, the gradient will help converging faster as long as the gradient computation is not too slow. If you can not compute a useful or fast enough gradient for your custom model, you can just return a zero vector with the correct dimensionality (number of rows equal to number of parameters).
- Parameters:
x (numpy.ndarray[n, 1]) – Input vector
- Returns:
The gradient of the (unnormalized) log_density
- Return type:
numpy.ndarray[n, 1]