src/core/layer/regularization/Dropout.java
public void forwardProcess() throws MatrixException {
        resetLayerOutputs();
        Sequence inputSequence = getPreviousLayerOutputs();

        if (isTraining()) {
            for (Integer sampleIndex : inputSequence.keySet()) {
                for (Matrix matrix : inputSequence.get(sampleIndex).values()) {
                    // Implements forward step for inverted drop out.<br>
                    // Function selectively masks out certain percentage of node governed by parameter probability during training phase.<br>
                    // During training phase it also compensates all remaining inputs by dividing by probability.<br>
                    matrix.multiply(1 / probability, matrix);
                    matrix.setMask();
                    matrix.getMask().setProbability(probability);
                    matrix.getMask().maskRowByProbability();
                }
            }
        }

        getLayerOutputs().putAll(inputSequence);
    }
/**
     * Takes single forward processing step to process layer input(s).<br>
     *
     * @throws MatrixException throws exception if matrix operation fails.
     */
Takes single forward processing step to process layer input(s).

@throws MatrixException throws exception if matrix operation fails.
Takes single forward processing step to process layer input ( s ) . @throws MatrixException throws exception if matrix operation fails .
public void forwardProcess() throws MatrixException {
        resetLayerOutputs();
        Sequence inputSequence = getPreviousLayerOutputs();
        if (isTraining()) {
            for (Integer sampleIndex : inputSequence.keySet()) {
                for (Matrix matrix : inputSequence.get(sampleIndex).values()) {
                    matrix.multiply(1 / probability, matrix);
                    matrix.setMask();
                    matrix.getMask().setProbability(probability);
                    matrix.getMask().maskRowByProbability();
                }
            }
        }
        getLayerOutputs().putAll(inputSequence);
    }
public void forwardProcess ( ) throws MatrixException { resetLayerOutputs ( ) ; Sequence inputSequence = getPreviousLayerOutputs ( ) ; if ( isTraining ( ) ) { for ( Integer sampleIndex : inputSequence . keySet ( ) ) { for ( Matrix matrix : inputSequence . get ( sampleIndex ) . values ( ) ) { matrix . multiply ( 1 / probability , matrix ) ; matrix . setMask ( ) ; matrix . getMask ( ) . setProbability ( probability ) ; matrix . getMask ( ) . maskRowByProbability ( ) ; } } } getLayerOutputs ( ) . putAll ( inputSequence ) ; }
Takes single forward processing step to process layer input(s).<br>
Takes single forward processing step to process layer input ( s ) . <br >
// Implements forward step for inverted drop out.<br>
 // Function selectively masks out certain percentage of node governed by parameter probability during training phase.<br>
 // During training phase it also compensates all remaining inputs by dividing by probability.<br>
