Package deepboof.forward
Interface SpatialBatchNorm<T extends Tensor<T>>
- All Known Implementing Classes:
SpatialBatchNorm_F32,SpatialBatchNorm_F64
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
-
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms batch norm on spatial data.voidsetParameters(List<T> parameters) Seeforward(T, T)for a description of parameters.Methods inherited from interface deepboof.forward.BatchNorm
getEPS, hasGammaBeta, setEPSMethods inherited from interface deepboof.Function
getOutputShape, getParameters, getParameterShapes, getTensorType, initialize
-
Method Details
-
forward
Performs batch norm on spatial data.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 -
setParameters
Seeforward(T, T)for a description of parameters.- Specified by:
setParametersin interfaceFunction<T extends Tensor<T>>- Parameters:
parameters- Variable tensor. (C, M), where M is 2 or 4. Not modified.
-