Skip to content

Instantly share code, notes, and snippets.

View chaitjo's full-sized avatar
🧬

Chaitanya Joshi chaitjo

🧬
View GitHub Profile
@karpathy
karpathy / gist:587454dc0146a6ae21fc
Last active May 14, 2025 00:08
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):