[][src]Trait opencv::hub_prelude::NormalizeBBoxLayerTrait

pub trait NormalizeBBoxLayerTrait: LayerTrait {
    pub fn as_raw_NormalizeBBoxLayer(&self) -> *const c_void;
pub fn as_raw_mut_NormalizeBBoxLayer(&mut self) -> *mut c_void; pub fn pnorm(&self) -> f32 { ... }
pub fn set_pnorm(&mut self, val: f32) { ... }
pub fn epsilon(&self) -> f32 { ... }
pub fn set_epsilon(&mut self, val: f32) { ... }
pub fn across_spatial(&self) -> bool { ... }
pub fn set_across_spatial(&mut self, val: bool) { ... } }

inline formula - normalization layer.

Parameters

  • p: Normalization factor. The most common p = 1 for inline formula - normalization or p = 2 for inline formula - normalization or a custom one.
  • eps: Parameter inline formula 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.

Required methods

Loading content...

Provided methods

pub fn pnorm(&self) -> f32[src]

pub fn set_pnorm(&mut self, val: f32)[src]

pub fn epsilon(&self) -> f32[src]

pub fn set_epsilon(&mut self, val: f32)[src]

pub fn across_spatial(&self) -> bool[src]

pub fn set_across_spatial(&mut self, val: bool)[src]

Loading content...

Implementors

Loading content...