espnet2.asr.layers.multiconv_cgmlp.MultiConvolutionalSpatialGatingUnit
Less than 1 minute
espnet2.asr.layers.multiconv_cgmlp.MultiConvolutionalSpatialGatingUnit
class espnet2.asr.layers.multiconv_cgmlp.MultiConvolutionalSpatialGatingUnit(size: int, arch_type: str, kernel_sizes: str, merge_conv_kernel: int, use_non_linear: bool, dropout_rate: float, use_linear_after_conv: bool, activation, gate_activation: str)
Bases: Module
Multi Convolutional Spatial Gating Unit (M-CSGU).
Initializes internal Module state, shared by both nn.Module and ScriptModule.
espnet_initialization_fn()
forward(x, gate_add=None)
Forward method
- Parameters:
- x (torch.Tensor) – (N, T, D)
- gate_add (torch.Tensor) – (N, T, D/2)
- Returns: (N, T, D/2)
- Return type: out (torch.Tensor)