cuqi.distribution.JointDistribution.enable_FD#
- JointDistribution.enable_FD(epsilon=None)[source]#
Enable finite difference approximation for logd gradient. Note that if enabled, the FD approximation will be used even if the _gradient method is implemented. By default, all parameters will have FD enabled with a step size of 1e-8.
- Parameters:
epsilon (dict, optional)
finite (Dictionary indicating the spacing (step size) to use for)
variable. (difference approximation for logd gradient for each)
names. (Keys are variable)
FD (Values are either a float to enable FD with the given value as the)
size (step)
for (or None to disable FD for that variable. Default is 1e-8)
variables. (all)