public interface DSpatialPadding2D<T extends deepboof.Tensor<T>>
extends deepboof.forward.SpatialPadding2D<T>
| Modifier and Type | Method and Description |
|---|---|
void |
backwardsChannel(T gradientPadded,
int batch,
int channel,
T gradientInput)
Compute the gradient of the input image from the gradient of the padded image for a specific mini-batch and
channel of the input tensor.
|
void |
backwardsImage(T gradientPadded,
int batch,
T gradientInput)
Compute the gradient of the input image from the gradient of the padded image for a specific mini-batch and
channel of the input tensor.
|
void backwardsChannel(T gradientPadded, int batch, int channel, T gradientInput)
Compute the gradient of the input image from the gradient of the padded image for a specific mini-batch and channel of the input tensor.
gradientPadded - (Input) Gradient of padded image at specific mini-batch and channel. (H, W)batch - (Input) mini-batch.channel - (Input) Channel.gradientInput - (Output) Output 4D spatial tensor. Only elements used to compute the channel are modified.
(N, C, H, W)void backwardsImage(T gradientPadded, int batch, T gradientInput)
Compute the gradient of the input image from the gradient of the padded image for a specific mini-batch and channel of the input tensor.
gradientPadded - (Input) Gradient of padded image at specific mini-batch. (C, H, W)batch - (Input) mini-batch.gradientInput - (Output) Output 4D spatial tensor. Only elements used to compute the image are modified.
(N, C, H, W)