Skip to content

Instantly share code, notes, and snippets.

View magicly's full-sized avatar

magicly magicly

View GitHub Profile
@magicly
magicly / min-char-rnn.py
Last active December 4, 2018 14:04 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
all_names = set(data.split("\n"))
chars = list(set(data))