models.modules.Norm

Contents

models.modules.Norm#

class Norm(bias: bool = False)[source]#

Bases: LayerGen

Batch Normalization layer generator

Uses torch.nn.BatchNorm2d module.

Parameters:

bias (bool, optional) – If True, adds a learnable bias. Defaults to False.

Methods

get

Initializes and returns the network layer

get(in_channels: int) Tuple[Module, int][source]#

Initializes and returns the network layer

Parameters:

in_channels (int) – Number of input channels.

Returns:

The generated module and the number of channels that will be after applying this layer to a tensor with in_channels channels.

Return type:

Tuple[nn.Module, int]