espnet2.asr.state_spaces.pool.DownPool2d
Less than 1 minute
espnet2.asr.state_spaces.pool.DownPool2d
class espnet2.asr.state_spaces.pool.DownPool2d(d_input, d_output, stride=1, transposed=True, weight_norm=True)
Bases: SequenceModule
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x)
Forward pass.
A sequence-to-sequence transformation with an optional state.
Generally, this should map a tensor of shape (batch, length, self.d_model) to (batch, length, self.d_output)
Additionally, it returns a “state” which can be any additional information For example, RNN and SSM layers may return their hidden state, while some types of transformer layers (e.g. Transformer-XL) may want to pass a state as well