ml4gw.nn package
Subpackages
- ml4gw.nn.autoencoder package
- ml4gw.nn.resnet package
- ml4gw.nn.streaming package
Submodules
ml4gw.nn.norm module
- class ml4gw.nn.norm.GroupNorm1D(num_channels, num_groups=None, eps=1e-05)
Bases:
Module
Custom implementation of GroupNorm which is faster than the out-of-the-box PyTorch version at inference time.
- forward(x)
Define the computation performed at every call.
Should be overridden by all subclasses. :rtype:
Float[Tensor, 'batch channel length']
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.
- class ml4gw.nn.norm.GroupNorm1DGetter(groups=None)
Bases:
object
Utility for making a NormLayer Callable that maps from an integer number of channels to a torch Module. Useful for command-line parameterization with jsonargparse.
- class ml4gw.nn.norm.GroupNorm2DGetter(groups=None)
Bases:
object
Utility for making a NormLayer Callable that maps from an integer number of channels to a torch Module. Useful for command-line parameterization with jsonargparse.