o
    ¡¿¯iò  ã                   @   s(   d dl Z d dlmZ G dd„ deƒZdS )é    N)Ú
AbsDecoderc                       sP   e Zd ZdZ	ddedef‡ fdd„Zdejdejfd	d
„Ze	dd„ ƒZ
‡  ZS )ÚLinearDecoderz&Linear decoder for speaker diarizationé   Úencoder_output_sizeÚnum_spkc                    s$   t ƒ  ¡  || _tj ||¡| _d S ©N)ÚsuperÚ__init__Ú_num_spkÚtorchÚnnÚLinearÚlinear_decoder)Úselfr   r   ©Ú	__class__© úW/home/ubuntu/.local/lib/python3.10/site-packages/espnet2/diar/decoder/linear_decoder.pyr	   	   s   
zLinearDecoder.__init__ÚinputÚilensc                 C   s   |   |¡}|S )z•Forward.

        Args:
            input (torch.Tensor): hidden_space [Batch, T, F]
            ilens (torch.Tensor): input lengths [Batch]
        )r   )r   r   r   Úoutputr   r   r   Úforward   s   
zLinearDecoder.forwardc                 C   s   | j S r   )r
   )r   r   r   r   r      s   zLinearDecoder.num_spk)r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úintr	   r   ÚTensorr   Úpropertyr   Ú__classcell__r   r   r   r   r      s    ýþý	r   )r   Ú espnet2.diar.decoder.abs_decoderr   r   r   r   r   r   Ú<module>   s    