Package deepboof.impl.backward.standard
Class DSpatialWindowChannel<T extends deepboof.Tensor<T>,P extends DSpatialPadding2D<T>>
java.lang.Object
deepboof.impl.forward.standard.BaseFunction<T>
deepboof.impl.forward.standard.BaseSpatialWindow<T,VT>
deepboof.impl.forward.standard.SpatialWindowChannel<T,P>
deepboof.impl.backward.standard.DSpatialWindowChannel<T,P>
- All Implemented Interfaces:
deepboof.DFunction<T>,deepboof.Function<T>
- Direct Known Subclasses:
DSpatialMaxPooling_F64
public abstract class DSpatialWindowChannel<T extends deepboof.Tensor<T>,P extends DSpatialPadding2D<T>>
extends deepboof.impl.forward.standard.SpatialWindowChannel<T,P>
implements deepboof.DFunction<T>
Backwards functions for operations which convolve a window across the input spatial tensor and
process the image in a BCHW (batch, channel, (row, column)) order, e.g. one channel at a time.
-
Field Summary
Fields Modifier and Type Field Description protected Tdpaddingprotected booleanlearningModeFields inherited from class deepboof.impl.forward.standard.SpatialWindowChannel
outputFields 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 DSpatialWindowChannel(deepboof.forward.ConfigSpatial config, P padding) -
Method Summary
Modifier and Type Method Description protected abstract void_backwards(T input, T dout, T gradientInput, List<T> gradientParameters)voidbackwards(T input, T dout, T gradientInput, List<T> gradientParameters)protected abstract voidbackwardsAt_border(P padded, int batch, int channel, int padY, int padX, int outY, int outX)Applies the backwards local window operation.protected abstract voidbackwardsAt_inner(T input, int batch, int channel, int inY, int inX, int outY, int outX)Applies the backwards local window operation.voidbackwardsChannel(T input, T gradientInput)Convolve window across 'input' spatial tensor and compute its gradientvoidevaluating()Class<T>getTensorType()booleanisLearning()voidlearning()Methods inherited from class deepboof.impl.forward.standard.SpatialWindowChannel
forwardAt_border, forwardAt_inner, forwardChannelMethods inherited from class deepboof.impl.forward.standard.BaseSpatialWindow
_initialize, getPadding, innerLowerExtent, innerUpperExtent, isEntirelyBorderMethods inherited from class deepboof.impl.forward.standard.BaseFunction
_forward, _setParameters, 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
forward, getOutputShape, getParameters, getParameterShapes, initialize, setParameters
-
Field Details
-
learningMode
protected boolean learningMode -
dpadding
-
-
Constructor Details
-
DSpatialWindowChannel
-
-
Method Details
-
backwards
-
_backwards
-
backwardsChannel
Convolve window across 'input' spatial tensor and compute its gradient- Parameters:
input- Input spatial tensorgradientInput- Storage for input's gradient
-
backwardsAt_inner
protected abstract void backwardsAt_inner(T input, int batch, int channel, int inY, int inX, int outY, int outX)Applies the backwards local window operation. The padded gradient (dpadding) should be computed here. The input gradient will be found later on- Parameters:
input- Input spatial tensorbatch- Index of input in mini-batch that is being processedchannel- ChannelinY- y-axis lower extent, in input tensor coordinatesinX- x-axis lower extent, in input tensor coordinatesoutY- y-axis output coordinateoutX- x-axis output coordinate
-
backwardsAt_border
protected abstract void backwardsAt_border(P padded, int batch, int channel, int padY, int padX, int outY, int outX)Applies the backwards local window operation. The padded gradient (dpadding) should be computed here. The input gradient will be found later on- Parameters:
padded- Input spatial virtual tensorbatch- Index of input in mini-batch that is being processedchannel- ChannelpadY- y-axis lower extent, in padded tensor coordinatespadX- x-axis lower extent, in padded tensor coordinatesoutY- y-axis output coordinateoutX- x-axis output coordinate
-
learning
public void learning() -
evaluating
public void evaluating() -
isLearning
public boolean isLearning() -
getTensorType
-