Interface SpatialConvolve2D<T extends Tensor<T>>

All Superinterfaces:
Function<T>
All Known Implementing Classes:
SpatialConvolve2D_F32, SpatialConvolve2D_F64

public interface SpatialConvolve2D<T extends Tensor<T>> extends Function<T>
Performs convolutions across an input image with special kernels that have 'C' channels, one for each input image.
  • Method Details

    • forward

      void forward(T input, T output)
      Applies forward spacial convolution. Each spacial convolution kernel is composed of a C 2D kernels that are applied to the input image. The number of channels in the output image is dependent on the number of spacial kernels in this layer.
       Input   shape = (N, C, H,  W)
       Outputs shape = (N, F, H', W')
       Weight  shape = (F, C, HH, WW)
       Bias    shape = (F,)
       -------------------------------------------------
       N   = Size of mini-batch
       C   = Number of channels in input image
       H   = Height of input image
       W   = With of input image
       F   = Number of kernels or channels in output
       H'  = Height of output image. H' = 1 + (H + padY0 + padY1 - HH) / periodY
       W'  = Width of output image.  W' = 1 + (W + padX0 + padX1 - WW) / periodX
       HH  = Height of kernel
       WW  = Width of kernel
       
      Specified by:
      forward in interface Function<T extends Tensor<T>>
      Parameters:
      input - Tensor with the shape (N,C,H,W)
      output - Output tensor (N, F, H', W') Modified.
    • setParameters

      void setParameters(List<T> parameters)
      See forward(T, T) for a description of parameters.
      Specified by:
      setParameters in interface Function<T extends Tensor<T>>
      Parameters:
      parameters - Two tensors. Weights = (F, C, HH, WW), bias = (F,)
    • getConfiguration

      ConfigConvolve2D getConfiguration()
      Returns configuration of spacial parameters
      Returns:
      Copy of configuration
    • getPadding

      SpatialPadding2D<T> getPadding()
      Returns the padding