espnet2.asr.state_spaces.pool.UpPool
espnet2.asr.state_spaces.pool.UpPool
class espnet2.asr.state_spaces.pool.UpPool(d_input, d_output, stride, transposed=True, weight_norm=True, initializer=None, activation=None)
Bases: SequenceModule
Initializes internal Module state, shared by both nn.Module and ScriptModule.
property d_output
Output dimension of model.
This attribute is required for all SequenceModule instantiations. It is used by the rest of the pipeline (e.g. model backbone, decoder) to track the internal shapes of the full model.
default_state(*batch_shape, device=None)
Create initial state for a batch of inputs.
forward(x, skip=None)
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)