Local attention (Luong et al., 2015) looks only at a window of source positions around a predicted alignment point. It is cheaper than attending to the whole sentence, and the window keeps the search focused.
Implement local_window(center, D, T), returning the window of source positions to attend to.
Take the window from center minus D to center plus D inclusive, then clamp both ends to the sentence.
No results yet
Run your code to check it against the examples, or submit to run every test.