Interface InputPreProcessor

    • Method Detail

      • preProcess

        INDArray preProcess​(INDArray input,
                            int miniBatchSize,
                            LayerWorkspaceMgr workspaceMgr)
        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

        INDArray backprop​(INDArray output,
                          int miniBatchSize,
                          LayerWorkspaceMgr workspaceMgr)
        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
      • getOutputType

        InputType getOutputType​(InputType inputType)
        For a given type of input to this preprocessor, what is the type of the output?
        Parameters:
        inputType - Type of input for the preprocessor
        Returns:
        Type of input after applying the preprocessor