espnet2.asr_transducer.encoder.blocks.conv_input.ConvInput
Less than 1 minute
espnet2.asr_transducer.encoder.blocks.conv_input.ConvInput
class espnet2.asr_transducer.encoder.blocks.conv_input.ConvInput(input_size: int, conv_size: int | Tuple, subsampling_factor: int = 4, vgg_like: bool = True, output_size: int | None = None)
Bases: Module
ConvInput module definition.
- Parameters:
- input_size – Input size.
- conv_size – Convolution size.
- subsampling_factor – Subsampling factor.
- vgg_like – Whether to use a VGG-like network.
- output_size – Block output dimension.
Construct a ConvInput object.
forward(x: Tensor, mask: Tensor | None = None) → Tuple[Tensor, Tensor]
Encode input sequences.
- Parameters:
- x – ConvInput input sequences. (B, T, D_feats)
- mask – Mask of input sequences. (B, 1, T)
- Returns: ConvInput output sequences. (B, sub(T), D_out) mask: Mask of output sequences. (B, 1, sub(T))
- Return type: x