public interface SpatialBatchNorm<T extends Tensor<T>> extends Function<T>, BatchNorm
Spatial Batch Normalization seeks to maintain the convolutional property, "that
different elements of the same feature map, at different locations, are normalized in the same way." [1]
Thus the input tensor (N,C,H,W) is "reshaped" such that it is (N*H*W,C) and it's treated like a mini-batch
with N*H*W elements.
See BatchNorm for a general discussion of Batch Normalization
| Modifier and Type | Method and Description |
|---|---|
void |
forward(T input,
T output)
Performs batch norm on spatial data.
|
void |
setParameters(java.util.List<T> parameters)
See
forward(T, T) for a description of parameters. |
getOutputShape, getParameters, getParameterShapes, getTensorType, initializegetEPS, hasGammaBeta, setEPSvoid forward(T input, T output)
Summary Table
-------------------------------------------------
Input shape = (N, C, H, W)
Output shape = (N, C, H, W)
Params shape = (C, M)
-------------------------------------------------
N = Size of mini-batch
C = Number of channels in input image
H = Height of input image
W = With of input image
M = Number of parameters. 2 or 4 if gamma-beta is being used.
in order of: mean, stdev OR mean, stdev, gamma, beta
void setParameters(java.util.List<T> parameters)
forward(T, T) for a description of parameters.setParameters in interface Function<T extends Tensor<T>>parameters - Variable tensor. (C, M), where M is 2 or 4. Not modified.