Class SeparableConvolution2DLayer

    • Method Detail

      • backpropGradient

        public Pair<Gradient,​INDArray> backpropGradient​(INDArray epsilon,
                                                              LayerWorkspaceMgr workspaceMgr)
        Description copied from interface: Layer
        Calculate the gradient relative to the error in the next layer
        Specified by:
        backpropGradient in interface Layer
        Overrides:
        backpropGradient in class ConvolutionLayer
        Parameters:
        epsilon - w^(L+1)*delta^(L+1). Or, equiv: dC/da, i.e., (dC/dz)*(dz/da) = dC/da, where C is cost function a=sigma(z) is activation.
        workspaceMgr - Workspace manager
        Returns:
        Pair where Gradient is gradient for this layer, INDArray is epsilon (activation gradient) needed by next layer, but before element-wise multiply by sigmaPrime(z). So for standard feed-forward layer, if this layer is L, then return.getSecond() == dL/dIn = (w^(L)*(delta^(L))^T)^T. Note that the returned array should be placed in the ArrayType.ACTIVATION_GRAD workspace via the workspace manager
      • preOutput

        protected Pair<INDArray,​INDArray> preOutput​(boolean training,
                                                          boolean forBackprop,
                                                          LayerWorkspaceMgr workspaceMgr)
        Description copied from class: ConvolutionLayer
        PreOutput method that also returns the im2col2d array (if being called for backprop), as this can be re-used instead of being calculated again.
        Overrides:
        preOutput in class ConvolutionLayer
        Parameters:
        training - Train or test time (impacts dropout)
        forBackprop - If true: return the im2col2d array for re-use during backprop. False: return null for second pair entry. Note that it may still be null in the case of CuDNN and the like.
        Returns:
        Pair of arrays: preOutput (activations) and optionally the im2col2d array
      • activate

        public INDArray activate​(boolean training,
                                 LayerWorkspaceMgr workspaceMgr)
        Description copied from interface: Layer
        Perform forward pass and return the activations array with the last set input
        Specified by:
        activate in interface Layer
        Overrides:
        activate in class ConvolutionLayer
        Parameters:
        training - training or test mode
        workspaceMgr - Workspace manager
        Returns:
        the activation (layer output) of the last specified input. Note that the returned array should be placed in the ArrayType.ACTIVATIONS workspace via the workspace manager