Batch Norm Training
A trainable Batch Normalization transform, as described in https://arxiv.org/abs/1502.03167 . When training is complete, use its @see inferenceMode property to get the computed affine transform. This version maintains an exponential moving average of the sum of the samples, sum of the squared samples, and sample count which are used to estimate the population mean and variance.
Epsilon is hardcoded to 1.e-5f.
Constructors
BatchNormTraining
Link copied to clipboard
Functions
cpu
Link copied to clipboard
extract Tangent
Link copied to clipboard
open override fun extractTangent(output: DTensor, extractor: (DTensor, DTensor) -> DTensor): TrainableComponent.Companion.Tangent
Content copied to clipboard
get Single Input
Link copied to clipboard
Helper to check that the layer was called with a single input. Returns that input if successful, else errors.
gpu
Link copied to clipboard
load
Link copied to clipboard
store
Link copied to clipboard
training Step
Link copied to clipboard
open override fun trainingStep(optim: Optimizer<*>, tangent: Trainable.Tangent): BatchNormTraining
Content copied to clipboard
with Trainables
Link copied to clipboard
open override fun withTrainables(trainables: List<Trainable<*>>): BatchNormTraining
Content copied to clipboard
wrap
Link copied to clipboard
The wrap function should return the same static type it is declared on.
Properties
Inheritors
BatchNorm2d
Link copied to clipboard