espnet2.asr.state_spaces.pool.DownPool
espnet2.asr.state_spaces.pool.DownPool
class espnet2.asr.state_spaces.pool.DownPool(d_input, d_output=None, expand=None, stride=1, transposed=True, weight_norm=True, initializer=None, activation=None)
Bases: SequenceModule
Initializes internal Module state, shared by both nn.Module and ScriptModule.
default_state(*batch_shape, device=None)
Create initial state for a batch of inputs.
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
step(x, state, **kwargs)
Step one time step as a recurrent model.
x: (…, H)