Trait opencv::prelude::NormalizeBBoxLayerTraitConst
source · [−]pub trait NormalizeBBoxLayerTraitConst: LayerTraitConst {
fn as_raw_NormalizeBBoxLayer(&self) -> *const c_void;
fn pnorm(&self) -> f32 { ... }
fn epsilon(&self) -> f32 { ... }
fn across_spatial(&self) -> bool { ... }
}
Expand description
- normalization layer.
Parameters
- p: Normalization factor. The most common
p = 1
for- normalization or
p = 2
for- normalization or a custom one.
- eps: Parameter
to prevent a division by zero.
- across_spatial: If true, normalize an input across all non-batch dimensions. Otherwise normalize an every channel separately.
Across spatial: @f[ norm = \sqrt[p]{\epsilon + \sum_{x, y, c} |src(x, y, c)|^p } \ dst(x, y, c) = \frac{ src(x, y, c) }{norm} @f]
Channel wise normalization: @f[ norm(c) = \sqrt[p]{\epsilon + \sum_{x, y} |src(x, y, c)|^p } \ dst(x, y, c) = \frac{ src(x, y, c) }{norm(c)} @f]
Where x, y
- spatial coordinates, c
- channel.
An every sample in the batch is normalized separately. Optionally, output is scaled by the trained parameters.