speechbrain icon indicating copy to clipboard operation
speechbrain copied to clipboard

ECAPA TDNN length_to_mask

Open helloworld02202 opened this issue 3 years ago • 2 comments

I am confused with the using of length_to_mask here, where lengths * L Any idea of doing so? Because for simple case like lengths with size (B,) = (2,) and values [10,100], it will become [1000,10000]

https://github.com/speechbrain/speechbrain/blob/7897537fe929affa8e809b0229f464acbca7632d/speechbrain/lobes/models/ECAPA_TDNN.py#L254

helloworld02202 avatar Jul 04 '22 10:07 helloworld02202

Hi, this is a question for @mravanelli and @anautsch

TParcollet avatar Jul 12 '22 09:07 TParcollet

Hi @helloworld02202, sorry for the late reply, I only found time to look into the code again. This function must return the mask i.e. will need to retrieve the max sentence length. This is why lengths is multiplied by L. L corresponds to the time dimension, hence, it is multiplied with the length vector that contains the relative lengths of the current sequences with the SpeechBrain style.

TParcollet avatar Jul 20 '22 20:07 TParcollet

Hello,

It seems that @TParcollet has answered your question. Therefore, I am closing this issue. Please feel free to reopen it if necessary. Thank you very much 😃

Adel-Moumen avatar Sep 27 '22 08:09 Adel-Moumen