Skip to content

Instantly share code, notes, and snippets.

View emjotde's full-sized avatar

Marcin Junczys-Dowmunt emjotde

View GitHub Profile
@emjotde
emjotde / gist:9cf3a14e164e86274340
Created December 3, 2015 20:08 — forked from karpathy/gist:587454dc0146a6ae21fc
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):