espnet2.uasr.generator.conv_generator.ConvGenerator
espnet2.uasr.generator.conv_generator.ConvGenerator
class espnet2.uasr.generator.conv_generator.ConvGenerator(input_dim: int, output_dim: int, cfg: Dict | None = None, conv_kernel: int = 3, conv_dilation: int = 1, conv_stride: int = 9, pad: int = -1, bias: str2bool = False, dropout: float = 0.0, batch_norm: str2bool = True, batch_norm_weight: float = 30.0, residual: str2bool = True)
Bases: AbsGenerator
convolutional generator for UASR.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
bn_padded_data(feature: Tensor, padding_mask: Tensor)
forward(feats: Tensor, text: Tensor | None, feats_padding_mask: Tensor)
Defines the computation performed at every call.
Should be overridden by all subclasses.
NOTE
Although the recipe for forward pass needs to be defined within this function, one should call the Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
output_size()