Skip to content

Instantly share code, notes, and snippets.

View seanie12's full-sized avatar
🎲

Seanie Lee seanie12

🎲
View GitHub Profile
@seanie12
seanie12 / seq2seq_attention.py
Last active February 15, 2019 01:57
sequence to sequence with attention in Keras
import tensorflow as tf
import os
import numpy as np
# settings for GPU
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.gpu_options.per_process_gpu_memory_fraction = 0.9
sess = tf.Session(config=config)