Skip to content

Instantly share code, notes, and snippets.

View SuperGops7's full-sized avatar
:octocat:
There's nothing that a couple of lines of code can't do

Gopikrishnan K SuperGops7

:octocat:
There's nothing that a couple of lines of code can't do
  • National University of Singapore
  • Singapore
  • 15:52 (UTC +08:00)
  • X @GopiManchurian
View GitHub Profile
@wassname
wassname / keras_attention_wrapper.py
Created November 1, 2016 08:06
A keras attention layer that wraps RNN layers.
"""
A keras attention layer that wraps RNN layers.
Based on tensorflows [attention_decoder](https://github.com/tensorflow/tensorflow/blob/c8a45a8e236776bed1d14fd71f3b6755bd63cc58/tensorflow/python/ops/seq2seq.py#L506)
and [Grammar as a Foreign Language](https://arxiv.org/abs/1412.7449).
date: 20161101
author: wassname
url: https://gist.github.com/wassname/5292f95000e409e239b9dc973295327a
"""