Package deepboof.forward
Interface SpatialPooling<T extends Tensor>
- All Superinterfaces:
Function<T>
- All Known Subinterfaces:
SpatialAveragePooling<T>,SpatialMaxPooling<T>
- All Known Implementing Classes:
SpatialAveragePooling_F32,SpatialAveragePooling_F64,SpatialMaxPooling_F32,SpatialMaxPooling_F64
public interface SpatialPooling<T extends Tensor> extends Function<T>
Spatial pooling down samples the input spatial tensors by finding a representative value inside
each pooling region. The intent is to reduce the number of variables while maintaining much of the original
information. Pooling is specified by the region's size (poolWidth, poolHeight) and the sampling
period (periodX, periodY), and padding parameters.
Processing Steps:
- Apply spatial padding
- Apply spatial pooling to padded image
Notes
- The first region has it's lower extent at the spatial region's lower extent.
- Sampling is done in a row-major ordering, e.g. columns then rows
- If a region extends outside the image plus padding it's ignore
- See Also:
SpatialPadding2D,SpatialMaxPooling,SpatialAveragePooling
-
Method Summary
Modifier and Type Method Description voidforward(T input, T output)Processes a spatial tensor.ConfigSpatialgetConfiguration()Returns pooling configurationvoidsetParameters(java.util.List<T> parameters)Can skip.Methods inherited from interface deepboof.Function
getOutputShape, getParameters, getParameterShapes, getTensorType, initialize
-
Method Details
-
forward
Processes a spatial tensor.N = number of mini-batch images C = number of channels in each image H = height of input image W = width of input image Hp = height of input image + padding Wp = width of input image + padding Shape of output spacial tensor: H' = 1 + (Hp - poolHeight) / periodY W' = 1 + (Wp - poolWidth ) / periodX
-
setParameters
Can skip. No parameters required.- Specified by:
setParametersin interfaceFunction<T extends Tensor>- Parameters:
parameters- No parameters required
-
getConfiguration
ConfigSpatial getConfiguration()Returns pooling configuration- Returns:
- configuration
-