espnet2.asr.frontend.cnn.ConvLayerBlock
Less than 1 minute
espnet2.asr.frontend.cnn.ConvLayerBlock
class espnet2.asr.frontend.cnn.ConvLayerBlock(in_channels: int, out_channels: int, kernel_size: int, stride: int, bias: bool, layer_norm: Module | None, conv_mode: str)
Bases: Module
Convolution unit of FeatureExtractor
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(x: Tensor, length: Tensor | None) → Tuple[Tensor, Tensor | None]
- Parameters:
- x (Tensor) – Shape:
[batch, in_channels, in_frame]
. - length (Tensor or None , optional) – Shape
[batch, ]
.
- x (Tensor) – Shape:
- Returns: Shape
[batch, out_channels, out_frames]
. Optional[Tensor]: Shape[batch, ]
. - Return type: Tensor