Class DSpatialMaxPooling_F64

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<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>
deepboof.impl.backward.standard.DSpatialMaxPooling_F64
All Implemented Interfaces:
deepboof.DFunction<deepboof.tensors.Tensor_F64>, deepboof.Function<deepboof.tensors.Tensor_F64>

public class DSpatialMaxPooling_F64
extends DSpatialWindowChannel<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>
Implementation of DSpatialPadding2D_F64 for Tensor_F64 that extends DSpatialWindowChannel. Comments:
dpadding is a 2D tensor of the spatial region only. In the forwards pass the partial coordinate's index is saved and the batch + channel indexes are implicit saved in the output index tensor.
  • Field Summary

    Fields inherited from class deepboof.impl.backward.standard.DSpatialWindowChannel

    dpadding, learningMode

    Fields inherited from class deepboof.impl.forward.standard.SpatialWindowChannel

    output

    Fields inherited from class deepboof.impl.forward.standard.BaseSpatialWindow

    C, config, H, HH, Ho, Hp, N, padding, W, Wo, Wp, WW

    Fields inherited from class deepboof.impl.forward.standard.BaseFunction

    miniBatchSize, parameters, shapeInput, shapeOutput, shapeParameters
  • Constructor Summary

    Constructors
    Constructor Description
    DSpatialMaxPooling_F64​(deepboof.forward.ConfigSpatial config, DSpatialPadding2D_F64 padding)  
  • Method Summary

    Modifier and Type Method Description
    protected void _backwards​(deepboof.tensors.Tensor_F64 input, deepboof.tensors.Tensor_F64 dout, deepboof.tensors.Tensor_F64 gradientInput, List<deepboof.tensors.Tensor_F64> gradientParameters)  
    void _forward​(deepboof.tensors.Tensor_F64 input, deepboof.tensors.Tensor_F64 output)  
    void _setParameters​(List<deepboof.tensors.Tensor_F64> parameters)  
    protected void backwardsAt_border​(DSpatialPadding2D_F64 padded, int batch, int channel, int padY, int padX, int outY, int outX)
    Applies the backwards local window operation.
    protected void backwardsAt_inner​(deepboof.tensors.Tensor_F64 input, int batch, int channel, int inY, int inX, int outY, int outX)
    Applies the backwards local window operation.
    protected void forwardAt_border​(DSpatialPadding2D_F64 padded, int batch, int channel, int padY, int padX, int outY, int outX)  
    protected void forwardAt_inner​(deepboof.tensors.Tensor_F64 input, int batch, int channel, int inY, int inX, int outY, int outX)  

    Methods inherited from class deepboof.impl.backward.standard.DSpatialWindowChannel

    backwards, backwardsChannel, evaluating, getTensorType, isLearning, learning

    Methods inherited from class deepboof.impl.forward.standard.SpatialWindowChannel

    forwardChannel

    Methods inherited from class deepboof.impl.forward.standard.BaseSpatialWindow

    _initialize, getPadding, innerLowerExtent, innerUpperExtent, isEntirelyBorder

    Methods inherited from class deepboof.impl.forward.standard.BaseFunction

    forward, getOutputShape, getParameters, getParameterShapes, initialize, setParameters

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface deepboof.Function

    forward, getOutputShape, getParameters, getParameterShapes, initialize, setParameters
  • Constructor Details

    • DSpatialMaxPooling_F64

      public DSpatialMaxPooling_F64​(deepboof.forward.ConfigSpatial config, DSpatialPadding2D_F64 padding)
  • Method Details

    • _setParameters

      public void _setParameters​(List<deepboof.tensors.Tensor_F64> parameters)
      Specified by:
      _setParameters in class deepboof.impl.forward.standard.BaseFunction<deepboof.tensors.Tensor_F64>
    • _forward

      public void _forward​(deepboof.tensors.Tensor_F64 input, deepboof.tensors.Tensor_F64 output)
      Specified by:
      _forward in class deepboof.impl.forward.standard.BaseFunction<deepboof.tensors.Tensor_F64>
    • _backwards

      protected void _backwards​(deepboof.tensors.Tensor_F64 input, deepboof.tensors.Tensor_F64 dout, deepboof.tensors.Tensor_F64 gradientInput, List<deepboof.tensors.Tensor_F64> gradientParameters)
      Specified by:
      _backwards in class DSpatialWindowChannel<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>
    • backwardsAt_inner

      protected void backwardsAt_inner​(deepboof.tensors.Tensor_F64 input, int batch, int channel, int inY, int inX, int outY, int outX)
      Description copied from class: DSpatialWindowChannel
      Applies the backwards local window operation. The padded gradient (dpadding) should be computed here. The input gradient will be found later on
      Specified by:
      backwardsAt_inner in class DSpatialWindowChannel<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>
      Parameters:
      input - Input spatial tensor
      batch - Index of input in mini-batch that is being processed
      channel - Channel
      inY - y-axis lower extent, in input tensor coordinates
      inX - x-axis lower extent, in input tensor coordinates
      outY - y-axis output coordinate
      outX - x-axis output coordinate
    • backwardsAt_border

      protected void backwardsAt_border​(DSpatialPadding2D_F64 padded, int batch, int channel, int padY, int padX, int outY, int outX)
      Description copied from class: DSpatialWindowChannel
      Applies the backwards local window operation. The padded gradient (dpadding) should be computed here. The input gradient will be found later on
      Specified by:
      backwardsAt_border in class DSpatialWindowChannel<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>
      Parameters:
      padded - Input spatial virtual tensor
      batch - Index of input in mini-batch that is being processed
      channel - Channel
      padY - y-axis lower extent, in padded tensor coordinates
      padX - x-axis lower extent, in padded tensor coordinates
      outY - y-axis output coordinate
      outX - x-axis output coordinate
    • forwardAt_inner

      protected void forwardAt_inner​(deepboof.tensors.Tensor_F64 input, int batch, int channel, int inY, int inX, int outY, int outX)
      Specified by:
      forwardAt_inner in class deepboof.impl.forward.standard.SpatialWindowChannel<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>
    • forwardAt_border

      protected void forwardAt_border​(DSpatialPadding2D_F64 padded, int batch, int channel, int padY, int padX, int outY, int outX)
      Specified by:
      forwardAt_border in class deepboof.impl.forward.standard.SpatialWindowChannel<deepboof.tensors.Tensor_F64,​DSpatialPadding2D_F64>