
    9i                     ^    S SK Jr  SSKJr   " S S\5      r " S S\5      r " S S	\5      rg)
    N   )	LayerBasec                   :   ^  \ rS rSrU 4S jrS rS rS rSrU =r	$ )RectifiedLinear   c                 j   > [         [        U ]  5         Xl        [        R
                  " 5       U l        g N)superr   __init__dimnnReLUreluself	input_dim
output_dim	__class__s      n/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/modelscope/models/audio/aec/layers/activations.pyr   RectifiedLinear.__init__
   s"    ot-/GGI	    c                 $    U R                  U5      $ r	   )r   r   inputs     r   forwardRectifiedLinear.forward   s    yyr   c                 F    SnUSU R                   U R                   4-  -  nU$ )N z<RectifiedLinear> %d %d
r   r   re_strs     r   to_kaldi_nnetRectifiedLinear.to_kaldi_nnet   s)    -4880DDDr   c                     U$ r	    r   instrs     r   load_kaldi_nnetRectifiedLinear.load_kaldi_nnet       r   )r   r   
__name__
__module____qualname____firstlineno__r   r   r"   r(   __static_attributes____classcell__r   s   @r   r   r      s    
 
 r   r   c                   :   ^  \ rS rSrU 4S jrS rS rS rSrU =r	$ )
LogSoftmax   c                 j   > [         [        U ]  5         Xl        [        R                  " 5       U l        g r	   )r
   r4   r   r   r   lsr   s      r   r   LogSoftmax.__init__   s"    j$(*--/r   c                 $    U R                  U5      $ r	   )r7   r   s     r   r   LogSoftmax.forward"   s    wwu~r   c                 F    SnUSU R                   U R                   4-  -  nU$ )Nr   z<Softmax> %d %d
r   r    s     r   r"   LogSoftmax.to_kaldi_nnet%   )    %488(<<<r   c                     U$ r	   r%   r&   s     r   r(   LogSoftmax.load_kaldi_nnet*   r*   r   )r   r7   r+   r2   s   @r   r4   r4      s    "

 r   r4   c                   :   ^  \ rS rSrU 4S jrS rS rS rSrU =r	$ )Sigmoid.   c                 j   > [         [        U ]  5         Xl        [        R                  " 5       U l        g r	   )r
   rA   r   r   r   sigr   s      r   r   Sigmoid.__init__0   s"    gt%'::<r   c                 $    U R                  U5      $ r	   )rD   r   s     r   r   Sigmoid.forward5   s    xxr   c                 F    SnUSU R                   U R                   4-  -  nU$ )Nr   z<Sigmoid> %d %d
r   r    s     r   r"   Sigmoid.to_kaldi_nnet8   r=   r   c                     U$ r	   r%   r&   s     r   r(   Sigmoid.load_kaldi_nnet=   r*   r   )r   rD   r+   r2   s   @r   rA   rA   .   s     

 r   rA   )torch.nnr   
layer_baser   r   r4   rA   r%   r   r   <module>rN      s1     !i & &i r   