Skip to content

Instantly share code, notes, and snippets.

View kmjjacobs's full-sized avatar

Kevin Jacobs kmjjacobs

View GitHub Profile
@kmjjacobs
kmjjacobs / char_seq2seq.py
Last active July 13, 2019 16:50
A character-based Seq2Seq model
# Code for https://www.data-blogger.com/2017/12/14/create-a-character-based-seq2seq-using-python-and-tensorflow/
# Imports
import tensorflow as tf
import pandas as pd
from nltk import word_tokenize
from collections import Counter
import numpy as np
# Load the data
@kmjjacobs
kmjjacobs / gru_tensorflow.py
Last active August 14, 2022 17:10
GRU (Gated Recurrent Unit) implementation in TensorFlow and used in a simple Machine Learning task. The corresponding tutorial is found on Data Blogger: https://www.data-blogger.com/2017/08/27/gru-implementation-tensorflow/.
#%% (0) Important libraries
import tensorflow as tf
import numpy as np
from numpy import random
import matplotlib.pyplot as plt
from IPython import display
% matplotlib inline
#%% (1) Dataset creation.