o
    i                     @   s    d Z dd Zdd Zdd ZdS )zConformer common arguments.c                 C   sf   | j ddtg ddd | j ddtdd	 | j d
ddtdd	 | j ddtdd	 | j ddtdd	 | S )z(Define common arguments for RNN encoder.z--etypeblstmp)lstmblstmlstmpr   vgglstmp	vggblstmpvgglstmvggblstmgrubgrugrupbgrupvgggrupvggbgrupvgggruvggbgruz$Type of encoder network architecturedefaulttypechoiceshelpz	--elayers   zNumber of encoder layersr   r   r   z--eunitsz-ui,  zNumber of encoder hidden unitsz--eprojs@  z"Number of encoder projection unitsz--subsample1zhSubsample input frames x_y_z means subsample every x frame at 1st layer, every y frame at 2nd layer etc.)add_argumentstrintgroup r   ]/home/ubuntu/.local/lib/python3.10/site-packages/funasr/models/language_model/rnn/argument.py add_arguments_rnn_encoder_common   s8   r!   c              	   C   s   | j ddtddgdd | j ddtdd	 | j d
dtdd	 | j ddtdd	 | j ddtdd	 | j dddtdddgdd | S )z(Define common arguments for RNN decoder.z--dtyper   r	   z$Type of decoder network architecturer   z	--dlayers   zNumber of decoder layersr   z--dunitsr   zNumber of decoder hidden unitsz--dropout-rate-decoder        zDropout rate for the decoderz--sampling-probabilityz-Ratio of predicted labels fed back to decoderz
--lsm-type ?unigramz8Apply label smoothing with a specified distribution type)constr   r   nargsr   r   r   r   r   floatr   r   r   r     add_arguments_rnn_decoder_common:   s>   	r+   c                 C   s   | j ddtg ddd | j ddtdd	 | j d
dtdd	 | j ddtdd	 | j ddtdd	 | j ddtdd	 | j ddtdd	 | S )z*Define common arguments for RNN attention.z--atypedot)noattr,   addlocationcoveragecoverage_location
location2dlocation_recurrentmulti_head_dotmulti_head_addmulti_head_locmulti_head_multi_res_loczType of attention architecturer   z--adimr   z-Number of attention transformation dimensionsr   z--awin   z$Window size for location2d attentionz--aheadsr   z(Number of heads for multi head attentionz--aconv-chanszvNumber of attention convolution channels                        (negative value indicates no location-aware attention)z--aconv-filtsd   zuNumber of attention convolution filters                        (negative value indicates no location-aware attention)z--dropout-rater#   zDropout rate for the encoderr)   r   r   r   r    "add_arguments_rnn_attention_common]   sN   r;   N)__doc__r!   r+   r;   r   r   r   r    <module>   s   3#