espnet2.enh.layers.tcn.TemporalConvNetInformed
Less than 1 minute
espnet2.enh.layers.tcn.TemporalConvNetInformed
class espnet2.enh.layers.tcn.TemporalConvNetInformed(N, B, H, P, X, R, Sc=None, out_channel=None, norm_type='gLN', causal=False, pre_mask_nonlinear='prelu', mask_nonlinear='relu', i_adapt_layer: int = 7, adapt_layer_type: str = 'mul', adapt_enroll_dim: int = 128, **adapt_layer_kwargs)
Bases: TemporalConvNet
Basic Module of TasNet with adaptation layers.
- Parameters:
- N – Number of filters in autoencoder
- B – Number of channels in bottleneck 1 * 1-conv block
- H – Number of channels in convolutional blocks
- P – Kernel size in convolutional blocks
- X – Number of convolutional blocks in each repeat
- R – Number of repeats
- Sc – Number of channels in skip-connection paths’ 1x1-conv blocks
- out_channel – Number of output channels if it is None, N will be used instead.
- norm_type – BN, gLN, cLN
- causal – causal or non-causal
- pre_mask_nonlinear – the non-linear function before masknet
- mask_nonlinear – use which non-linear function to generate mask
- i_adapt_layer – int, index of the adaptation layer
- adapt_layer_type – str, type of adaptation layer see espnet2.enh.layers.adapt_layers for options
- adapt_enroll_dim – int, dimensionality of the speaker embedding
forward(mixture_w, enroll_emb)
TasNet forward with adaptation layers.
- Parameters:
- mixture_w – [M, N, K], M is batch size
- enroll_emb – [M, 2*adapt_enroll_dim] if self.skip_connection [M, adapt_enroll_dim] if not self.skip_connection
- Returns: [M, N, K]
- Return type: est_mask