o
    ¡¿¯i  ã                   @   sD   d Z ddlmZ ddlZddlmZ ddlmZ G dd„ deƒZdS )zLinear Projection.é    )ÚTupleN)Úcheck_argument_types)ÚAbsPreEncoderc                       s^   e Zd ZdZdedef‡ fdd„Zdejdejdeejejf fd	d
„Z	defdd„Z
‡  ZS )ÚLinearProjectionzLinear Projection Preencoder.Ú
input_sizeÚoutput_sizec                    s.   t ƒ sJ ‚tƒ  ¡  || _tj ||¡| _dS )zInitialize the module.N)r   ÚsuperÚ__init__Ú
output_dimÚtorchÚnnÚLinearÚ
linear_out)Úselfr   r   ©Ú	__class__© úQ/home/ubuntu/.local/lib/python3.10/site-packages/espnet2/asr/preencoder/linear.pyr	      s   

zLinearProjection.__init__ÚinputÚinput_lengthsÚreturnc                 C   s   |   |¡}||fS )zForward.)r   )r   r   r   Úoutputr   r   r   Úforward   s   
zLinearProjection.forwardc                 C   s   | j S )zGet the output size.)r
   )r   r   r   r   r   %   s   zLinearProjection.output_size)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úintr	   r   ÚTensorr   r   r   Ú__classcell__r   r   r   r   r      s    þýÿÿ
þr   )	r   Útypingr   r   Ú	typeguardr   Ú%espnet2.asr.preencoder.abs_preencoderr   r   r   r   r   r   Ú<module>   s   