Class ConstantPadding2D_F32

All Implemented Interfaces:
ConstantPadding2D<Tensor_F32>, SpatialPadding2D<Tensor_F32>, ITensor, VTensor_F32, VTensor

public class ConstantPadding2D_F32 extends SpatialPadding2D_F32 implements ConstantPadding2D<Tensor_F32>
Pads pixels outside the input image with a user specified constant value.
  • Constructor Details

    • ConstantPadding2D_F32

      public ConstantPadding2D_F32(ConfigPadding config)
    • ConstantPadding2D_F32

      public ConstantPadding2D_F32(ConfigPadding config, float value)
  • Method Details

    • borderGet

      public float borderGet(int minibatch, int channel, int row, int col)
      Description copied from class: SpatialPadding2D_F32
      Handles coordinates outside the input image
      Specified by:
      borderGet in class SpatialPadding2D_F32
    • getClippingOffsetRow

      public int getClippingOffsetRow(int paddedRow)
      Description copied from interface: SpatialPadding2D
      Returns how far away the row is from the clipping border. 0 if it is inside the image. Positive is below the lower extent and negative if above upper extent.
      Specified by:
      getClippingOffsetRow in interface SpatialPadding2D<Tensor_F32>
      Parameters:
      paddedRow - Row in padded coordinates
      Returns:
      offset
    • getClippingOffsetCol

      public int getClippingOffsetCol(int paddedCol)
      Description copied from interface: SpatialPadding2D
      Returns how far away the column is from the clipping border. 0 if it is inside the image. Positive is below the lower extent and negative if above upper extent.
      Specified by:
      getClippingOffsetCol in interface SpatialPadding2D<Tensor_F32>
      Parameters:
      paddedCol - Column in padded coordinates
      Returns:
      offset
    • isClipped

      public boolean isClipped()
      Description copied from interface: SpatialPadding2D
      Returns true if this is a clipped border or false of it is not.
      Specified by:
      isClipped in interface SpatialPadding2D<Tensor_F32>
      Returns:
      if clipped or not
    • getTensorType

      public Class<Tensor_F32> getTensorType()
      Description copied from interface: SpatialPadding2D
      Returns the type of input tensor it can process
      Specified by:
      getTensorType in interface SpatialPadding2D<Tensor_F32>
      Returns:
      Type of tensor
    • getPaddingValue

      public double getPaddingValue()
      Specified by:
      getPaddingValue in interface ConstantPadding2D<Tensor_F32>