Applies Batch Normalization over a 2D or 3D input (a mini-batch of 1D inputs with optional additional channel dimension)
The mean and standard-deviation are calculated per-dimension over the mini-batches and
\(\gamma\( and \(\beta\) are learnable parameter vectors of size \(C\) (where \(C\) is the
input size). By default, the elements of \(\gamma\) are set to 1 and the elements of
\(\beta\) are set to 0. The standard-deviation is calculated via the biased estimator,
equivalent to dfx.var(input, unbiased=False).
Also by default, during training this layer keeps running estimates of its computed mean and variance, which are then used for normalization during evaluation. The running estimates are kept with a default momentum of 0.1.
If trackRunningStats is set to False, this layer then does not keep running estimates, and batch statistics are instead used during evaluation time as well.
| Constructor |
Description
|
Full Usage:
BatchNorm1d(numFeatures, ?eps, ?momentum, ?affine, ?trackRunningStats, ?reversible)
Parameters:
int
?eps : double
?momentum : Tensor
?affine : bool
?trackRunningStats : bool
?reversible : bool
Returns: BatchNorm1d
|
|
| Instance member |
Description
|
TBD
|
|
TBD
|
|
|
TBD
|
|
TBD
|
|
TBD
|
ModelBase
| Instance member |
Description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TBD
|
Full Usage:
this.eval ()
|
TBD |
Full Usage:
this.forwardDiff (derivatives, ?nestingTag)
Parameters:
ParameterDict
-
The derivatives of the parameters
?nestingTag : uint32
-
The level tag for nested differentiation. Defaults to the current global nesting level
|
Adjust the parameters of the model to initiate a new level of forward-mode automatic differentiation. After this call the current parameters of the model will have attached derivatives for forward mode differentiation.
|
|
|
|
|
Full Usage:
this.noDiff ()
|
TBD |
Full Usage:
this.reverseDiff ?nestingTag
Parameters:
uint32
-
The level tag for nested differentiation. Defaults to the current global nesting level
|
Adjust the parameters of the model to initiate a new level of reverse-mode automatic differentiation.
After this call the current parameters of the model will support reverse-mode differentiation. After the completion
of the corresponding
|
Full Usage:
this.summary ()
Returns: string
|
TBD
|
Full Usage:
this.train ()
|
TBD |
|
|
|
TBD
|
|
TBD
|
Full Usage:
this.hasOwnParameters
Returns: bool
|
TBD
|
Full Usage:
this.isNoDiff
Returns: bool
|
|
|
|
Full Usage:
this.hasOwnBuffers
Returns: bool
|
TBD
|
|
TBD
|
Full Usage:
this.isReverseDiff
Returns: bool
|
|
Full Usage:
this.nstate
Returns: int
|
TBD
|
Full Usage:
this.nparameters
Returns: int
|
Gets the number of parameters of the Model
|
Full Usage:
this.hasOwnState
Returns: bool
|
TBD
|
|
TBD
|
Full Usage:
this.isForwardDiff
Returns: bool
|
|
|
TBD
|
|
TBD
|
Full Usage:
this.nbuffers
Returns: int
|
TBD
|
|
TBD
|
|
|
|
TBD
|
© Copyright 2021, DiffSharp and dfx Contributors.