src/utils/procedure/Procedure.java
public Matrix calculateGradient(Matrix outputGradient, int sampleIndex) throws MatrixException, DynamicParamException {
        setOutputSampleGradient(sampleIndex, new MMatrix(outputGradient));
        gradientChain.calculateGradientStep(sampleIndex, 0);
        return getInputNodes().get(0).getGradient(sampleIndex);
    }
/**
     * Calculates backward chain of gradient expressions.
     *
     * @param outputGradient output gradient for procedure.
     * @param sampleIndex sample index.
     * @return input gradient.
     * @throws MatrixException throws exception if calculation fails.
     * @throws DynamicParamException throws exception if parameter (params) setting fails.
     */
Calculates backward chain of gradient expressions.

@param outputGradient output gradient for procedure.
@param sampleIndex sample index.
@return input gradient.
@throws MatrixException throws exception if calculation fails.
@throws DynamicParamException throws exception if parameter (params) setting fails.
Calculates backward chain of gradient expressions . @param outputGradient output gradient for procedure . @param sampleIndex sample index . @return input gradient . @throws MatrixException throws exception if calculation fails . @throws DynamicParamException throws exception if parameter ( params ) setting fails .
public Matrix calculateGradient(Matrix outputGradient, int sampleIndex) throws MatrixException, DynamicParamException {
        setOutputSampleGradient(sampleIndex, new MMatrix(outputGradient));
        gradientChain.calculateGradientStep(sampleIndex, 0);
        return getInputNodes().get(0).getGradient(sampleIndex);
    }
public Matrix calculateGradient ( Matrix outputGradient , int sampleIndex ) throws MatrixException , DynamicParamException { setOutputSampleGradient ( sampleIndex , new MMatrix ( outputGradient ) ) ; gradientChain . calculateGradientStep ( sampleIndex , 0 ) ; return getInputNodes ( ) . get ( 0 ) . getGradient ( sampleIndex ) ; }
Calculates backward chain of gradient expressions.
Calculates backward chain of gradient expressions .