Class BatchNorm2d
java.lang.Object
ai.beestream.jitnn.nn.Module
ai.beestream.jitnn.nn.BatchNorm2d
- All Implemented Interfaces:
AutoCloseable
Batch normalisation over the channels of NCHW (or NC) input, PyTorch defaults: weight 1, bias
0, running mean 0 and variance 1, momentum 0.1, eps 1e-5. Uses batch statistics in training
mode and the running statistics in evaluation mode.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchNorm2d(int channels) Batch normalisation overchannelschannels with PyTorch's defaults (momentum 0.1, eps 1e-5).BatchNorm2d(int channels, float momentum, float eps) Batch normalisation with the given momentum for the running statistics and eps added to the variance. -
Method Summary
Modifier and TypeMethodDescriptionApplies the module tox.relu(forward(x)), fused into the normalisation kernel.The running mean [channels], updated in training mode.The running variance [channels], updated in training mode.Methods inherited from class Module
buffer, buffers, child, close, isClosed, isTraining, loadStateDict, parameter, parameterCount, parameters, stateDict, train, zeroGrad
-
Constructor Details
-
BatchNorm2d
public BatchNorm2d(int channels) Batch normalisation overchannelschannels with PyTorch's defaults (momentum 0.1, eps 1e-5). -
BatchNorm2d
public BatchNorm2d(int channels, float momentum, float eps) Batch normalisation with the given momentum for the running statistics and eps added to the variance.
-
-
Method Details
-
runningMean
The running mean [channels], updated in training mode. -
runningVar
The running variance [channels], updated in training mode. -
forward
-
forwardRelu
-