espnet2.legacy.nets.pytorch_backend.conformer.convolution.ConvolutionModule
Less than 1 minute
espnet2.legacy.nets.pytorch_backend.conformer.convolution.ConvolutionModule
class espnet2.legacy.nets.pytorch_backend.conformer.convolution.ConvolutionModule(channels, kernel_size, activation=ReLU(), bias=True)
Bases: Module
ConvolutionModule in Conformer model.
- Parameters:
- channels (int) β The number of channels of conv layers.
- kernel_size (int) β Kernerl size of conv layers.
Construct an ConvolutionModule object.
forward(x)
Compute convolution module.
- Parameters:x (torch.Tensor) β Input tensor (#batch, time, channels).
- Returns: Output tensor (#batch, time, channels).
- Return type: torch.Tensor
