espnet2.asr_transducer.encoder.building.build_main_parameters
Less than 1 minute
espnet2.asr_transducer.encoder.building.build_main_parameters
espnet2.asr_transducer.encoder.building.build_main_parameters(pos_wise_act_type: str = 'swish', conv_mod_act_type: str = 'swish', pos_enc_dropout_rate: float = 0.0, pos_enc_max_len: int = 5000, simplified_att_score: bool = False, norm_type: str = 'layer_norm', conv_mod_norm_type: str = 'layer_norm', after_norm_eps: float | None = None, after_norm_partial: float | None = None, blockdrop_rate: float = 0.0, dynamic_chunk_training: bool = False, short_chunk_threshold: float = 0.75, short_chunk_size: int = 25, num_left_chunks: int = 0, **activation_parameters) β Dict[str, Any]
Build encoder main parameters.
- Parameters:
- pos_wise_act_type β X-former position-wise feed-forward activation type.
- conv_mod_act_type β X-former convolution module activation type.
- pos_enc_dropout_rate β Positional encoding dropout rate.
- pos_enc_max_len β Positional encoding maximum length.
- simplified_att_score β Whether to use simplified attention score computation.
- norm_type β X-former normalization module type.
- conv_mod_norm_type β Conformer convolution module normalization type.
- after_norm_eps β Epsilon value for the final normalization.
- after_norm_partial β Value for the final normalization with RMSNorm.
- blockdrop_rate β Probability threshold of dropping out each encoder block.
- dynamic_chunk_training β Whether to use dynamic chunk training.
- short_chunk_threshold β Threshold for dynamic chunk selection.
- short_chunk_size β Minimum number of frames during dynamic chunk training.
- num_left_chunks β Number of left chunks the attention module can see. (null or negative value means full context)
- **activation_parameters β Parameters of the activation functions. (See espnet2/asr_transducer/activation.py)
- Returns: Main encoder parameters
