public abstract class BaseSpatialPadding2D<T extends Tensor<T>> extends BaseTensor implements SpatialPadding2D<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
COL0 |
protected int |
COL1 |
protected ConfigPadding |
config |
protected T |
input |
protected int |
ROW0 |
protected int |
ROW1 |
shape| Constructor and Description |
|---|
BaseSpatialPadding2D(ConfigPadding config) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Tensor<T>> |
checkBackwardsShapeChannel(Tensor<T> padded,
Tensor<T> original)
Sanity checks the input for backwards images
|
<T extends Tensor<T>> |
checkBackwardsShapeImage(Tensor<T> padded,
Tensor<T> original)
Sanity checks the input for backwards images
|
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.
|
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, getDimension, getShape, isShape, lengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClippingOffsetCol, getClippingOffsetRow, getTensorType, isClippedcreateCoor, getDataType, getDimension, getShape, isShape, lengthprotected ConfigPadding config
protected int ROW0
protected int ROW1
protected int COL0
protected int COL1
public BaseSpatialPadding2D(ConfigPadding config)
public void setInput(T input)
setInput in interface SpatialPadding2D<T extends Tensor<T>>input - The input tensorpublic int getPaddingRow0()
getPaddingRow0 in interface SpatialPadding2D<T extends Tensor<T>>public int getPaddingCol0()
getPaddingCol0 in interface SpatialPadding2D<T extends Tensor<T>>public int getPaddingRow1()
getPaddingRow1 in interface SpatialPadding2D<T extends Tensor<T>>public int getPaddingCol1()
getPaddingCol1 in interface SpatialPadding2D<T extends Tensor<T>>public int[] shapeGivenInput(int... inputShape)
shapeGivenInput in interface SpatialPadding2D<T extends Tensor<T>>inputShape - Input spatial tensor. 3-DOF with no mini-batch or 4-DOF with mini-batchpublic <T extends Tensor<T>> void checkBackwardsShapeChannel(Tensor<T> padded, Tensor<T> original)
padded - Input padded single channel image from forward layeroriginal - Output backwards spatial tensor