Skip to content

Instantly share code, notes, and snippets.

View samdroid-apps's full-sized avatar
🙂
Hope you're having a great day

Sam Parkinson samdroid-apps

🙂
Hope you're having a great day
View GitHub Profile
@karpathy
karpathy / gist:587454dc0146a6ae21fc
Last active July 11, 2024 10:36
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):