This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Sequence-to-sequence model with an attention mechanism.""" | |
| # see https://www.tensorflow.org/versions/r0.10/tutorials/seq2seq/index.html | |
| # compare https://github.com/tflearn/tflearn/blob/master/examples/nlp/seq2seq_example.py | |
| from __future__ import print_function | |
| import numpy as np | |
| import tensorflow as tf | |
| vocab_size=256 # We are lazy, so we avoid fency mapping and just use one *class* per character/byte | |
| target_vocab_size=vocab_size | |
| learning_rate=0.1 |