Shortcuts

asteroid.masknn.base module

class asteroid.masknn.base.BaseDCUMaskNet(encoders, decoders, mask_bound='tanh', **kwargs)[source]

Bases: asteroid.masknn.base.BaseUNet

Base class for DCU-style mask nets. Used for DCUMaskNet and DCCRMaskNet.

The preferred way to instantiate this class is to use the default_architecture() classmethod.

Parameters:
  • encoders (list of length N of tuples of (in_chan, out_chan, kernel_size, stride, padding)) – Arguments of encoders of the u-net
  • decoders (list of length N of tuples of (in_chan, out_chan, kernel_size, stride, padding)) – Arguments of decoders of the u-net
  • mask_bound (Optional[str], optional) – Type of mask bound to use, as defined in [1]. Valid values are “tanh” (“BDT mask”), “sigmoid” (“BDSS mask”), None (unbounded mask).

Input shape is expected to be [batch, n_freqs, time], with n_freqs - 1 divisible by f_0 * f_1 * … * f_N where f_k are the frequency strides of the encoders.

References

[1] : “Phase-aware Speech Enhancement with Deep Complex U-Net”, Hyeong-Seok Choi et al. https://arxiv.org/abs/1903.03107

classmethod default_architecture(architecture: str, **kwargs)[source]

Create a masknet instance from a predefined, named architecture.

Parameters:
  • architecture (str) – Name of predefined architecture. Valid values are dependent on the concrete subclass of BaseDCUMaskNet.
  • kwargs (optional) – Passed to ``__init__`.
forward(x)[source]
decoders_stride_product
encoders_stride_product
class asteroid.masknn.base.BaseUNet(encoders, decoders, *, intermediate_layer=None, output_layer=None)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Base class for u-nets with skip connections between encoders and decoders.

(For u-nets without skip connections, simply use a nn.Sequential.)

Parameters:
forward(x)[source]
Read the Docs v: v0.3.4
Versions
latest
stable
v0.3.4
v0.3.3
v0.3.2
v0.3.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.