Skip to content

Instantly share code, notes, and snippets.

View nafizh's full-sized avatar

Nafiz Hamid nafizh

View GitHub Profile
@nafizh
nafizh / rnn_viz_keras.py
Created October 31, 2017 04:38 — forked from tokestermw/rnn_viz_keras.py
Recurrent Neural Network (RNN) visualizations using Keras.
from __future__ import print_function
from keras import backend as K
from keras.engine import Input, Model, InputSpec
from keras.layers import Dense, Activation, Dropout, Lambda
from keras.layers import Embedding, LSTM
from keras.optimizers import Adam
from keras.preprocessing import sequence
from keras.utils.data_utils import get_file
from keras.datasets import imdb