Package deepboof.forward
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 Summary
Modifier and Type Method Description voidforward(T input, T output)Applies forward spacial convolution.ConfigConvolve2DgetConfiguration()Returns configuration of spacial parametersSpatialPadding2D<T>getPadding()Returns the paddingvoidsetParameters(List<T> parameters)Seeforward(T, T)for a description of parameters.Methods inherited from interface deepboof.Function
getOutputShape, getParameters, getParameterShapes, getTensorType, initialize
-
Method Details
-
forward
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
-
setParameters
Seeforward(T, T)for a description of parameters.- Specified by:
setParametersin interfaceFunction<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
-