Kyubyong / transformer

A TensorFlow Implementation of the Transformer: Attention Is All You Need
Apache License 2.0
4.28k stars 1.3k forks source link

what's difference between key masks and query masks? #153

Open superhg2012 opened 4 years ago

superhg2012 commented 4 years ago

Hi, I am using transformer for Fastspeech(TTS model). I am confusing with difference between key masks and query masks。 when to use query mask? or when to use key mask?