Class PermutePreprocessor

    • Constructor Detail

      • PermutePreprocessor

        public PermutePreprocessor​(int... permutationIndices)
    • Method Detail

      • preProcess

        public INDArray preProcess​(INDArray input,
                                   int miniBatchSize,
                                   LayerWorkspaceMgr workspaceMgr)
        Description copied from interface: InputPreProcessor
        Pre preProcess input/activations for a multi layer network
        Parameters:
        input - the input to pre preProcess
        miniBatchSize - Minibatch size
        workspaceMgr - Workspace manager
        Returns:
        the processed input. Note that the returned array should be placed in the ArrayType.ACTIVATIONS workspace via the workspace manager
      • backprop

        public INDArray backprop​(INDArray output,
                                 int miniBatchSize,
                                 LayerWorkspaceMgr workspaceMgr)
        Description copied from interface: InputPreProcessor
        Reverse the preProcess during backprop. Process Gradient/epsilons before passing them to the layer below.
        Parameters:
        output - which is a pair of the gradient and epsilon
        miniBatchSize - Minibatch size
        workspaceMgr - Workspace manager
        Returns:
        the reverse of the pre preProcess step (if any). Note that the returned array should be placed in ArrayType.ACTIVATION_GRAD workspace via the workspace manager