mlreco.models.layers.common.normalizations module

class mlreco.models.layers.common.normalizations.MinkowskiPixelNorm(eps=1e-08, dimension=3)[source]

Bases: torch.nn.modules.module.Module

Pixel Normalization Layer for Sparse Tensors. PixelNorm layers were used in NVIDIA’s ProGAN.

This layer normalizes the feature vector in each pixel to unit length, and has no trainable weights.

References

__init__(eps=1e-08, dimension=3)[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

__repr__()[source]

Return repr(self).

__module__ = 'mlreco.models.layers.common.normalizations'
training: bool
class mlreco.models.layers.common.normalizations.MinkowskiAdaIN(in_channels, dimension=3, eps=1e-05)[source]

Bases: torch.nn.modules.module.Module

Adaptive Instance Normalization Layer Original Paper: https://arxiv.org/pdf/1703.06868.pdf

Many parts of the code is borrowed from pytorch original BatchNorm implementation.

INPUT:
  • input: ME.SparseTensor

Returns

ME.SparseTensor

Return type

  • out

__init__(in_channels, dimension=3, eps=1e-05)[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

property weight
property bias
__module__ = 'mlreco.models.layers.common.normalizations'
forward(x)[source]
INPUTS:
  • x (ME.SparseTensor)

Returns

  • out (ME.SparseTensor)

training: bool
class mlreco.models.layers.common.normalizations.MinkowskiGroupNorm[source]

Bases: torch.nn.modules.module.Module

TODO

__module__ = 'mlreco.models.layers.common.normalizations'
training: bool