Skip to content

Instantly share code, notes, and snippets.

@pranv
pranv / lstm.py
Last active Jul 6, 2017
An Efficient, Batched, Stateful LSTM layer in Numpy
View lstm.py
import numpy as np
from utils import orthogonal, tanh, sigmoid, dtanh, dsigmoid
class LSTM(object):
"""Long Short Term Memory Unit
Parameters
----------