Package deepboof.impl.backward.standard
Class DSpatialWindowImage<T extends deepboof.Tensor<T>,P extends DSpatialPadding2D<T>>
java.lang.Object
deepboof.impl.forward.standard.BaseFunction<T>
deepboof.impl.forward.standard.BaseSpatialWindow<T,P>
deepboof.impl.forward.standard.SpatialWindowImage<T,P>
deepboof.impl.backward.standard.DSpatialWindowImage<T,P>
- All Implemented Interfaces:
deepboof.DFunction<T>,deepboof.Function<T>
- Direct Known Subclasses:
DSpatialConvolve2D_F64
public abstract class DSpatialWindowImage<T extends deepboof.Tensor<T>,P extends DSpatialPadding2D<T>>
extends deepboof.impl.forward.standard.SpatialWindowImage<T,P>
implements deepboof.DFunction<T>
Backwards functions for operations which convolve a window across the input spatial tensor.
Each image in a mini batch is processed one at a time.
-
Field Summary
Fields Modifier and Type Field Description protected Tdpaddingprotected booleanlearningModeFields inherited from class deepboof.impl.forward.standard.SpatialWindowImage
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 DSpatialWindowImage(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 padY, int padX, int outY, int outX)Applies the operations at the specified window and stores the results at the specified output coordinate.protected abstract voidbackwardsAt_inner(T input, int batch, int inY, int inX, int outY, int outX)Applies the operations at the specified window and stores the results at the specified output coordinate.protected voidbackwardsImage(T input, T gradientInput)voidevaluating()Class<T>getTensorType()booleanisLearning()voidlearning()Methods inherited from class deepboof.impl.forward.standard.SpatialWindowImage
forwardAt_border, forwardAt_inner, forwardImageMethods 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
-
DSpatialWindowImage
-
-
Method Details
-
backwards
-
_backwards
-
backwardsImage
-
backwardsAt_inner
protected abstract void backwardsAt_inner(T input, int batch, int inY, int inX, int outY, int outX)Applies the operations at the specified window and stores the results at the specified output coordinate.- Parameters:
input- Input spatial tensorbatch- Index of input in mini-batch that is being processedinY- y-axis lower extent, in input coordinatesinX- x-axis lower extent, in input coordinatesoutY- y-axis output coordinatesoutX- x-axis output coordinates
-
backwardsAt_border
protected abstract void backwardsAt_border(P padded, int batch, int padY, int padX, int outY, int outX)Applies the operations at the specified window and stores the results at the specified output coordinate. For virtual tensor- Parameters:
padded- Padded input spatial virtual tensorbatch- Index of input in mini-batch that is being processedpadY- y-axis lower extent, inclusive. Padded coordinatespadX- x-axis lower extent, inclusive. Padded coordinatesoutY- y-axis output coordinatesoutX- x-axis output coordinates
-
learning
public void learning() -
evaluating
public void evaluating() -
isLearning
public boolean isLearning() -
getTensorType
-