Interface JacobianNumerical<T>
- All Known Implementing Classes:
JacobianNumerical_F64
public interface JacobianNumerical<T>
Given a
CROperatorForward implementations of this interface will compute the gradient of its
inputs and parameters. Numerical differentiation is done using a symmetric sample, e.g.
dx = [f(x+T)-f(x-T)]/T-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(double T) Overrides default settings for computing numerical gradient.voidPerforms numerical differentiation to compute the gradients of input and parameters.voidsetFunction(List<CRArray<T>> inputs, CROperatorForward<T> function) Specifies the function which will be differentiated.
-
Method Details
-
configure
void configure(double T) Overrides default settings for computing numerical gradient.- Parameters:
T- Sampling distance used for numerical differentiation
-
setFunction
Specifies the function which will be differentiated.- Parameters:
inputs- Value of all inputs passed into the functionfunction- The function which is to be differentiated
-
differentiate
Performs numerical differentiation to compute the gradients of input and parameters. The value of parameters will be the current parameters stored in the function.- Parameters:
dout- (Input) Output's Jacobian, computed from next layer.jacInputs- (Output) Storage for input Jacobians
-