public interface SpatialPadding2D<T extends Tensor<T>> extends VTensor
Interface for all virtual 2D spatial padding implementation. Virtual padding contains a reference to the original input tensor which is going to be padded and on the fly will generate the values for elements which are not explicitly contained in the input tensor. This can reduce memory consumption and is more simplistic to implement for more complex padding methods.
Clipped padding is a special case. In this situation only pixels contained inside the original image should be processed.| Modifier and Type | Method and Description |
|---|---|
int |
getClippingOffsetCol(int paddedCol)
Returns how far away the column is from the clipping border.
|
int |
getClippingOffsetRow(int paddedRow)
Returns how far away the row is from the clipping border.
|
int |
getPaddingCol0()
Returns the lower-extent padding along the tensor's columns.
|
int |
getPaddingCol1()
Returns the upper-extent padding along the tensor's columns.
|
int |
getPaddingRow0()
Returns the lower-extent padding along the tensor's rows.
|
int |
getPaddingRow1()
Returns the upper-extent padding along the tensor's rows.
|
java.lang.Class<T> |
getTensorType()
Returns the type of input tensor it can process
|
boolean |
isClipped()
Returns true if this is a clipped border or false of it is not.
|
void |
setInput(T input)
Spatial tensor that padding is being added around
|
int[] |
shapeGivenInput(int... inputShape)
Returns what the tensor's shape will be when given can input tensor with
the spcified shape.
|
createCoor, getDataType, getDimension, getShape, isShape, lengthvoid setInput(T input)
input - The input tensorint getClippingOffsetRow(int paddedRow)
paddedRow - Row in padded coordinatesint getClippingOffsetCol(int paddedCol)
paddedCol - Column in padded coordinatesint getPaddingRow0()
int getPaddingCol0()
int getPaddingRow1()
int getPaddingCol1()
int[] shapeGivenInput(int... inputShape)
inputShape - Input spatial tensor. 3-DOF with no mini-batch or 4-DOF with mini-batchboolean isClipped()
java.lang.Class<T> getTensorType()