StreamingTransformer icon indicating copy to clipboard operation
StreamingTransformer copied to clipboard

Question about chunk mask

Open SoonSYJ opened this issue 4 years ago • 1 comments

In the chunk based streaming stretagy, encoder mask is caculated by method "adaptive_enc_mask". I try to reproduce the mask which is showed as the fig. As the figure shows, the encoder has a full history context and the future context is 32 * n_encoder_layer. Is that right? 2021-02-10_095005

SoonSYJ avatar Feb 10 '21 01:02 SoonSYJ

The future context depends on your right window size. For example, if each frame can only access the context within the same chunk (right_window=0), the future context is always 32 for all the encoder layers. However, if it can access the context in the next chunk (right_window=1), the future context is 32 * 2 * n_encoder_layer.

cywang97 avatar Feb 14 '21 10:02 cywang97