espnet2.asr.decoder.transformer_decoder.TransformerDecoder
Less than 1 minute
espnet2.asr.decoder.transformer_decoder.TransformerDecoder
class espnet2.asr.decoder.transformer_decoder.TransformerDecoder(vocab_size: int, encoder_output_size: int, attention_heads: int = 4, linear_units: int = 2048, num_blocks: int = 6, dropout_rate: float = 0.1, positional_dropout_rate: float = 0.1, self_attention_dropout_rate: float = 0.0, src_attention_dropout_rate: float = 0.0, input_layer: str = 'embed', use_output_layer: bool = True, pos_enc_class=<class 'espnet.nets.pytorch_backend.transformer.embedding.PositionalEncoding'>, normalize_before: bool = True, concat_after: bool = False, layer_drop_rate: float = 0.0, qk_norm: bool = False, use_flash_attn: bool = True)
Bases: BaseTransformerDecoder
Initializes internal Module state, shared by both nn.Module and ScriptModule.