Class NumericalGradient_F64

java.lang.Object
deepboof.impl.backward.standard.NumericalGradient_F64
All Implemented Interfaces:
NumericalGradient<deepboof.tensors.Tensor_F64>

public class NumericalGradient_F64
extends Object
implements NumericalGradient<deepboof.tensors.Tensor_F64>
Implementation of NumericalGradient for Tensor_F64
  • Constructor Summary

    Constructors
    Constructor Description
    NumericalGradient_F64()  
  • Method Summary

    Modifier and Type Method Description
    void configure​(double T)
    Overrides default settings for computing numerical gradient.
    void differentiate​(deepboof.tensors.Tensor_F64 input, List<deepboof.tensors.Tensor_F64> parameters, deepboof.tensors.Tensor_F64 dout, deepboof.tensors.Tensor_F64 gradientInput, 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NumericalGradient_F64

      public NumericalGradient_F64()
  • Method Details

    • configure

      public void configure​(double T)
      Description copied from interface: NumericalGradient
      Overrides default settings for computing numerical gradient.
      Specified by:
      configure in interface NumericalGradient<deepboof.tensors.Tensor_F64>
      Parameters:
      T - Sampling distance used for numerical differentiation
    • setFunction

      public void setFunction​(deepboof.Function<deepboof.tensors.Tensor_F64> function)
      Description copied from interface: NumericalGradient
      Sets the function which will be differentiated and other parameters. Function.initialize(int...) should have already been called.
      Specified by:
      setFunction in interface NumericalGradient<deepboof.tensors.Tensor_F64>
      Parameters:
      function - The function which is to be differentiated
    • differentiate

      public void differentiate​(deepboof.tensors.Tensor_F64 input, List<deepboof.tensors.Tensor_F64> parameters, deepboof.tensors.Tensor_F64 dout, deepboof.tensors.Tensor_F64 gradientInput, List<deepboof.tensors.Tensor_F64> gradientParameters)
      Description copied from interface: NumericalGradient
      Performs numerical differentiation to compute the gradients of input and parameters. When numerical differentiation is being performed input and parameters will be modified and then returned to their original state.
      Specified by:
      differentiate in interface NumericalGradient<deepboof.tensors.Tensor_F64>
      Parameters:
      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 input
      gradientParameters - Storage for gradients of parameters