Skip to content

Instantly share code, notes, and snippets.

Avatar
🔫
Invictus Maneo

M.Cemil Guney mcemilg

🔫
Invictus Maneo
View GitHub Profile
@mcemilg
mcemilg / tf_lstm.py
Last active Nov 16, 2017 — forked from siemanko/tf_lstm.py
Simple implementation of LSTM in Tensorflow in 50 lines (+ 130 lines of data generation and comments)
View tf_lstm.py
"""Short and sweet LSTM implementation in Tensorflow.
Motivation:
When Tensorflow was released, adding RNNs was a bit of a hack - it required
building separate graphs for every number of timesteps and was a bit obscure
to use. Since then TF devs added things like `dynamic_rnn`, `scan` and `map_fn`.
Currently the APIs are decent, but all the tutorials that I am aware of are not
making the best use of the new APIs.
Advantages of this implementation:
You can’t perform that action at this time.