neupy.layers.LocalResponseNorm

class neupy.layers.LocalResponseNorm[source]

Local Response Normalization Layer.

Aggregation is purely across channels, not within channels, and performed “pixelwise”.

If the value of the \(i\) th channel is \(x_i\), the output is

\[x_i = \frac{x_i}{ (k + ( \alpha \sum_j x_j^2 ))^\beta }\]

where the summation is performed over this position on \(n\) neighboring channels.

Parameters:
alpha : float

Coefficient, see equation above. Defaults to 1e-4.

beta : float

Offset, see equation above. Defaults to 0.75.

k : float

Exponent, see equation above. Defaults to 2.

depth_radius : int

Number of adjacent channels to normalize over, must be odd. Defaults to 5.

name : str or None

Layer’s name. Can be used as a reference to specific layer. When value specified as None than name will be generated from the class name. Defaults to None

Examples

>>> from neupy.layers import *
>>> network = Input((10, 10, 12)) >> LocalResponseNorm()
Attributes:
variables : dict

Variable names and their values. Dictionary can be empty in case if variables hasn’t been created yet.

Methods

variable(value, name, shape=None, trainable=True) Initializes variable with specified values.
get_output_shape(input_shape) Computes expected output shape from the layer based on the specified input shape.
output(*inputs, **kwargs) Propagetes input through the layer. The kwargs variable might contain additional information that propages through the network.
alpha = None[source]
beta = None[source]
depth_radius = None[source]
get_output_shape(input_shape)[source]
k = None[source]
options = {'alpha': Option(class_name='LocalResponseNorm', value=NumberProperty(name="alpha")), 'beta': Option(class_name='LocalResponseNorm', value=NumberProperty(name="beta")), 'depth_radius': Option(class_name='LocalResponseNorm', value=IntProperty(name="depth_radius")), 'k': Option(class_name='LocalResponseNorm', value=NumberProperty(name="k")), 'name': Option(class_name='BaseLayer', value=Property(name="name"))}[source]
output(input, **kwargs)[source]