Package deepboof.impl.forward.standard
Class SpatialAveragePooling_F32
java.lang.Object
deepboof.impl.forward.standard.BaseFunction<T>
deepboof.impl.forward.standard.BaseSpatialWindow<T,VT>
deepboof.impl.forward.standard.SpatialWindowChannel<Tensor_F32,SpatialPadding2D_F32>
deepboof.impl.forward.standard.SpatialAveragePooling_F32
- All Implemented Interfaces:
SpatialAveragePooling<Tensor_F32>,SpatialPooling<Tensor_F32>,Function<Tensor_F32>
public class SpatialAveragePooling_F32 extends SpatialWindowChannel<Tensor_F32,SpatialPadding2D_F32> implements SpatialAveragePooling<Tensor_F32>
Implementation of
SpatialAveragePooling for Tensor_F32.-
Field Summary
Fields Modifier and Type Field Description protected floatpoolingSizeFields inherited from class deepboof.impl.forward.standard.BaseSpatialWindow
C, config, H, HH, Ho, Hp, N, padding, W, Wo, Wp, WWFields inherited from class deepboof.impl.forward.standard.BaseFunction
miniBatchSize, parameters, shapeInput, shapeOutput, shapeParameters -
Constructor Summary
Constructors Constructor Description SpatialAveragePooling_F32(ConfigSpatial config, SpatialPadding2D_F32 padding) -
Method Summary
Modifier and Type Method Description void_forward(Tensor_F32 input, Tensor_F32 output)void_initialize()void_setParameters(java.util.List<Tensor_F32> parameters)protected voidforwardAt_border(SpatialPadding2D_F32 padded, int batch, int channel, int padY, int padX, int outY, int outX)Applies the operations at the specified window and stores the results at the specified output coordinate.protected voidforwardAt_inner(Tensor_F32 input, int batch, int channel, int inY, int inX, int outY, int outX)Applies the operations at the specified window and stores the results at the specified output coordinate.ConfigSpatialgetConfiguration()Returns pooling configurationjava.lang.Class<Tensor_F32>getTensorType()Returns the type of tensor it can processMethods inherited from class deepboof.impl.forward.standard.BaseSpatialWindow
getPadding, innerLowerExtent, innerUpperExtent, isEntirelyBorderMethods inherited from class deepboof.impl.forward.standard.BaseFunction
forward, getOutputShape, getParameters, getParameterShapes, initialize, setParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface deepboof.Function
getOutputShape, getParameters, getParameterShapes, initialize
-
Field Details
-
poolingSize
protected float poolingSize
-
-
Constructor Details
-
Method Details
-
_initialize
public void _initialize()- Overrides:
_initializein classBaseSpatialWindow<Tensor_F32,SpatialPadding2D_F32>
-
_setParameters
- Specified by:
_setParametersin classBaseFunction<Tensor_F32>
-
_forward
- Specified by:
_forwardin classBaseFunction<Tensor_F32>
-
forwardAt_inner
protected void forwardAt_inner(Tensor_F32 input, int batch, int channel, int inY, int inX, int outY, int outX)Description copied from class:SpatialWindowChannelApplies the operations at the specified window and stores the results at the specified output coordinate.- Specified by:
forwardAt_innerin classSpatialWindowChannel<Tensor_F32,SpatialPadding2D_F32>- Parameters:
input- Input spatial tensorbatch- Index of input in mini-batch that is being processedchannel- ChannelinY- y-axis lower extent, in input coordinatesinX- x-axis lower extent, in input coordinatesoutY- y-axis output coordinatesoutX- x-axis output coordinates
-
forwardAt_border
protected void forwardAt_border(SpatialPadding2D_F32 padded, int batch, int channel, int padY, int padX, int outY, int outX)Description copied from class:SpatialWindowChannelApplies the operations at the specified window and stores the results at the specified output coordinate. For virtual tensor- Specified by:
forwardAt_borderin classSpatialWindowChannel<Tensor_F32,SpatialPadding2D_F32>- Parameters:
padded- Input spatial virtual tensorbatch- Index of input in mini-batch that is being processedchannel- ChannelpadY- y-axis lower extent, in padded coordinatespadX- x-axis lower extent, in padded coordinatesoutY- y-axis output coordinatesoutX- x-axis output coordinates
-
getTensorType
Description copied from interface:FunctionReturns the type of tensor it can process- Specified by:
getTensorTypein interfaceFunction<Tensor_F32>- Returns:
- Type of tensor
-
getConfiguration
Description copied from interface:SpatialPoolingReturns pooling configuration- Specified by:
getConfigurationin interfaceSpatialPooling<Tensor_F32>- Returns:
- configuration
-