Attention Mechanism + Bidirectional Network

As this is mostly new code, I would merge it right away. Will do it at 6pm Bremen if I get no objections.