public class NumericalGradient_F64 extends java.lang.Object implements NumericalGradient<deepboof.tensors.Tensor_F64>
NumericalGradient for Tensor_F64| Constructor and Description |
|---|
NumericalGradient_F64() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(double T)
Overrides default settings for computing numerical gradient.
|
void |
differentiate(deepboof.tensors.Tensor_F64 input,
java.util.List<deepboof.tensors.Tensor_F64> parameters,
deepboof.tensors.Tensor_F64 dout,
deepboof.tensors.Tensor_F64 gradientInput,
java.util.List<deepboof.tensors.Tensor_F64> gradientParameters)
Performs numerical differentiation to compute the gradients of input and parameters.
|
void |
setFunction(deepboof.Function<deepboof.tensors.Tensor_F64> function)
Sets the function which will be differentiated and other parameters.
|
public void configure(double T)
NumericalGradientconfigure in interface NumericalGradient<deepboof.tensors.Tensor_F64>T - Sampling distance used for numerical differentiationpublic void setFunction(deepboof.Function<deepboof.tensors.Tensor_F64> function)
NumericalGradientFunction.initialize(int...) should have already been called.setFunction in interface NumericalGradient<deepboof.tensors.Tensor_F64>function - The function which is to be differentiatedpublic void differentiate(deepboof.tensors.Tensor_F64 input,
java.util.List<deepboof.tensors.Tensor_F64> parameters,
deepboof.tensors.Tensor_F64 dout,
deepboof.tensors.Tensor_F64 gradientInput,
java.util.List<deepboof.tensors.Tensor_F64> gradientParameters)
NumericalGradientinput and parameters will be modified
and then returned to their original state.differentiate in interface NumericalGradient<deepboof.tensors.Tensor_F64>input - The same input tensor which was passed in during the forward pass.parameters - The same parameters which was passed in during the forward pass.dout - Derivative of output, computed from next layer.gradientInput - Storage for gradient of inputgradientParameters - Storage for gradients of parameters