Seq2Seq tutorial without max_length in Attention

Hi everyone, i’m learning seq2seq model with pytorch tutorial. In the tutorial, it filters sentence pairs by max_length and use max_length property in attention mechanism (Bahdanau ?). Are there any way to implement attention without it ?. Because i want to train model without filter sentence pairs and i think if we set max_length is high such as 30 but actually attention need only 5 so it kinda expensive. I’m kinda new with this so correct me if I’m wrong and please give me detail explaination :slight_smile: . Thanks