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 T dpadding  
    protected boolean learningMode  

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

    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
    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)  
    void backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)  
    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.
    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.
    protected void backwardsImage​(T input, T gradientInput)  
    void evaluating()  
    Class<T> getTensorType()  
    boolean isLearning()  
    void learning()  

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

    forwardAt_border, forwardAt_inner, forwardImage

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

    _initialize, getPadding, innerLowerExtent, innerUpperExtent, isEntirelyBorder

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

    _forward, _setParameters, 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
  • Field Details

    • learningMode

      protected boolean learningMode
    • dpadding

      protected T extends deepboof.Tensor<T> dpadding
  • Constructor Details

    • DSpatialWindowImage

      public DSpatialWindowImage​(deepboof.forward.ConfigSpatial config, P padding)
  • Method Details

    • backwards

      public void backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)
      Specified by:
      backwards in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • _backwards

      protected abstract void _backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)
    • backwardsImage

      protected void backwardsImage​(T input, T gradientInput)
    • 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 tensor
      batch - Index of input in mini-batch that is being processed
      inY - y-axis lower extent, in input coordinates
      inX - x-axis lower extent, in input coordinates
      outY - y-axis output coordinates
      outX - 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 tensor
      batch - Index of input in mini-batch that is being processed
      padY - y-axis lower extent, inclusive. Padded coordinates
      padX - x-axis lower extent, inclusive. Padded coordinates
      outY - y-axis output coordinates
      outX - x-axis output coordinates
    • learning

      public void learning()
      Specified by:
      learning in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • evaluating

      public void evaluating()
      Specified by:
      evaluating in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • isLearning

      public boolean isLearning()
      Specified by:
      isLearning in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • getTensorType

      public Class<T> getTensorType()
      Specified by:
      getTensorType in interface deepboof.Function<T extends deepboof.Tensor<T>>