Z-yq / TensorflowASR

一个执着于让CPU\端侧-Model逼近GPU-Model性能的项目,CPU上的实时率(RTF)小于0.1
Apache License 2.0
461 stars 111 forks source link

mask of multiheadattention in conformer ? #8

Closed alsm168 closed 4 years ago

alsm168 commented 4 years ago

Hi I see the multiheadattention in conformer needs mask, Is there the code to generate the mask? thank you

Z-yq commented 4 years ago

I think that in the acoustic model, the role of mask is not particularly obvious, so there is no mask added. If you really need a mask, you can follow the method in transformer. locate in:

LMmodel/tf2_trm.py

create_masks()  #from tensorflow offical guide

------------------ 原始邮件 ------------------ 发件人: "Z-yq/TensorflowASR" <notifications@github.com>; 发送时间: 2020年10月14日(星期三) 下午2:53 收件人: "Z-yq/TensorflowASR"<TensorflowASR@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [Z-yq/TensorflowASR] mask of multiheadattention in conformer ? (#8)

Hi I see the multiheadattention in conformer needs mask, Is there the code to generate the mask? thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

alsm168 commented 4 years ago

ok,I'll try it later,thanks