espnet2.enh.layers.dc_crn.GLSTM
Less than 1 minute
espnet2.enh.layers.dc_crn.GLSTM
class espnet2.enh.layers.dc_crn.GLSTM(hidden_size=1024, groups=2, layers=2, bidirectional=False, rearrange=False)
Bases: Module
Grouped LSTM.
Reference: : Efficient Sequence Learning with Group Recurrent Networks; Gao et al., 2018
- Parameters:
- hidden_size (int) – total hidden size of all LSTMs in each grouped LSTM layer i.e., hidden size of each LSTM is hidden_size // groups
- groups (int) – number of LSTMs in each grouped LSTM layer
- layers (int) – number of grouped LSTM layers
- bidirectional (bool) – whether to use BLSTM or unidirectional LSTM
- rearrange (bool) – whether to apply the rearrange operation after each grouped LSTM layer
forward(x)
Grouped LSTM forward.
- Parameters:x (torch.Tensor) – (B, C, T, D)
- Returns: (B, C, T, D)
- Return type: out (torch.Tensor)