Interface CROperatorBackwardsGrad<T>

All Superinterfaces:
CROperatorForward<T>

public interface CROperatorBackwardsGrad<T> extends CROperatorForward<T>
Computes the gradient in the backwards direction and is used when optimizing. If the parameters are assumed to be known then no gradient will be produced for them since they are not being optimized. By default, parameters are not assumed to be known.
  • Method Details

    • gradient

      void gradient(CRArray<T> dout, List<CRArray<T>> gradientInputs)

      Computes the derivatives of all the inputs and parameters to this function .

      Mathematical explanation of how the partial derivatives are computed:

      Parameters:
      dout - (Input) Derivative of output conditional on this function, computed from next layer.
      gradientInputs - (Output) Gradient for all inputs which are not constant. If constant then the corresponding element is not modified. List will be filled in already.