Skip to content

Instantly share code, notes, and snippets.

View 1nF0rmed's full-sized avatar
🏠
Working from home

Pradyumna Rahul 1nF0rmed

🏠
Working from home
  • Bangalore
View GitHub Profile
@1nF0rmed
1nF0rmed / hello_sequence.py
Created October 28, 2017 17:21 — forked from pannous/hello_sequence.py
Simple "Hello World" for tensorflow seq2seq model
"""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