Compute Library
 20.02.1
NormalizationLayerInfo Class Reference

Normalization Layer Information class. More...

#include <Types.h>

Public Member Functions

 NormalizationLayerInfo (NormType type, uint32_t norm_size=5, float alpha=0.0001f, float beta=0.5f, float kappa=1.f, bool is_scaled=true)
 Default Constructor. More...
 
NormType type () const
 Get the normalization type. More...
 
uint32_t norm_size () const
 Get the normalization size. More...
 
float alpha () const
 Get the alpha value. More...
 
float beta () const
 Get the beta value. More...
 
float kappa () const
 Get the kappa value. More...
 
bool is_scaled () const
 Get the is_scaled value. More...
 
bool is_cross_map () const
 Check if normalization is cross map. More...
 
bool is_in_map () const
 Check if normalization is not cross map. More...
 
float scale_coeff () const
 Return the scaling factor of the normalization function. More...
 

Detailed Description

Normalization Layer Information class.

Definition at line 1677 of file Types.h.

Constructor & Destructor Documentation

◆ NormalizationLayerInfo()

NormalizationLayerInfo ( NormType  type,
uint32_t  norm_size = 5,
float  alpha = 0.0001f,
float  beta = 0.5f,
float  kappa = 1.f,
bool  is_scaled = true 
)
inline

Default Constructor.

Parameters
[in]typeThe normalization type. Can be NormType::IN_MAP_1D, NormType::IN_MAP_2D or NormType::CROSS_MAP
[in]norm_sizeThe normalization size is the number of elements to normalize across. Defaults to 5.
[in]alpha(Optional) Alpha parameter used by normalization equation. Defaults to 0.0001.
[in]beta(Optional) Beta parameter used by normalization equation. Defaults to 0.5.
[in]kappa(Optional) Kappa parameter used by [Krichevksy 2012] Across Channel Local Brightness Normalization equation.
[in]is_scaled(Optional) Boolean that specifies if alpha will be scaled by the normalization size or not. Should be false to follow [Krichevksy 2012].

Definition at line 1690 of file Types.h.

1691  : _type(type), _norm_size(norm_size), _alpha(alpha), _beta(beta), _kappa(kappa), _is_scaled(is_scaled)
1692  {
1693  }
float kappa() const
Get the kappa value.
Definition: Types.h:1715
uint32_t norm_size() const
Get the normalization size.
Definition: Types.h:1700
NormType type() const
Get the normalization type.
Definition: Types.h:1695
bool is_scaled() const
Get the is_scaled value.
Definition: Types.h:1720
float beta() const
Get the beta value.
Definition: Types.h:1710
float alpha() const
Get the alpha value.
Definition: Types.h:1705

Member Function Documentation

◆ alpha()

float alpha ( ) const
inline

Get the alpha value.

Definition at line 1705 of file Types.h.

1706  {
1707  return _alpha;
1708  }

◆ beta()

float beta ( ) const
inline

Get the beta value.

Definition at line 1710 of file Types.h.

1711  {
1712  return _beta;
1713  }

Referenced by CLNormalizationLayerKernel::configure(), and GCNormalizationLayerKernel::configure().

◆ is_cross_map()

bool is_cross_map ( ) const
inline

Check if normalization is cross map.

Definition at line 1725 of file Types.h.

1726  {
1727  return _type == NormType::CROSS_MAP;
1728  }
Normalization applied cross maps.

References arm_compute::CROSS_MAP.

Referenced by CLNormalizationLayerKernel::configure(), and NormalizationLayerInfo::is_in_map().

◆ is_in_map()

bool is_in_map ( ) const
inline

Check if normalization is not cross map.

Definition at line 1730 of file Types.h.

1731  {
1732  return !is_cross_map();
1733  }
bool is_cross_map() const
Check if normalization is cross map.
Definition: Types.h:1725

References NormalizationLayerInfo::is_cross_map().

Referenced by CLNormalizationLayerKernel::configure(), and GCNormalizationLayerKernel::configure().

◆ is_scaled()

bool is_scaled ( ) const
inline

Get the is_scaled value.

Definition at line 1720 of file Types.h.

1721  {
1722  return _is_scaled;
1723  }

◆ kappa()

float kappa ( ) const
inline

Get the kappa value.

Definition at line 1715 of file Types.h.

1716  {
1717  return _kappa;
1718  }

Referenced by CLNormalizationLayerKernel::configure(), and GCNormalizationLayerKernel::configure().

◆ norm_size()

uint32_t norm_size ( ) const
inline

Get the normalization size.

Definition at line 1700 of file Types.h.

1701  {
1702  return _norm_size;
1703  }

Referenced by CLNormalizationLayerKernel::configure(), and GCNormalizationLayerKernel::configure().

◆ scale_coeff()

float scale_coeff ( ) const
inline

Return the scaling factor of the normalization function.

If is_scaled is set to false then [Krichevksy 2012] normalization scaling is performed, where alpha is returned plainly, else alpha is scaled by the total number of elements used for the normalization.

Returns
The normalization scaling factor.

Definition at line 1741 of file Types.h.

1742  {
1743  const uint32_t size = (_type == NormType::IN_MAP_2D) ? _norm_size * _norm_size : _norm_size;
1744  return (_is_scaled) ? (_alpha / size) : _alpha;
1745  }
Normalization applied within the same map in 2D region.

References arm_compute::IN_MAP_2D.

Referenced by CLNormalizationLayerKernel::configure(), and GCNormalizationLayerKernel::configure().

◆ type()

NormType type ( ) const
inline

Get the normalization type.

Definition at line 1695 of file Types.h.

1696  {
1697  return _type;
1698  }

Referenced by CLNormalizationLayerKernel::configure(), GCNormalizationLayerKernel::configure(), NENormalizationLayerKernel::configure(), and DotGraphVisitor::visit().


The documentation for this class was generated from the following file: