espnet2.enh.layers.dpmulcat.DPMulCat
Less than 1 minute
espnet2.enh.layers.dpmulcat.DPMulCat
class espnet2.enh.layers.dpmulcat.DPMulCat(input_size: int, hidden_size: int, output_size: int, num_spk: int, dropout: float = 0.0, num_layers: int = 4, bidirectional: bool = True, input_normalize: bool = False)
Bases: Module
Dual-path RNN module with MulCat blocks.
- Parameters:
- input_size – int, dimension of the input feature. The input should have shape (batch, seq_len, input_size).
- hidden_size – int, dimension of the hidden state.
- output_size – int, dimension of the output size.
- num_spk – int, the number of speakers in the output.
- dropout – float, the dropout rate in the LSTM layer. (Default: 0.0)
- bidirectional – bool, whether the RNN layers are bidirectional. (Default: True)
- num_layers – int, number of stacked MulCat blocks. (Default: 4)
- input_normalize – bool, whether to apply GroupNorm on the input Tensor. (Default: False)
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(input)
Compute output after DPMulCat module.
- Parameters:input (torch.Tensor) – The input feature. Tensor of shape (batch, N, dim1, dim2) Apply RNN on dim1 first and then dim2
- Returns: (list(torch.Tensor) or list(list(torch.Tensor)) : In training mode, the module returns output of each DPMulCat block. In eval mode, the module only returns output in the last block.