Skip to main content
100%

Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy

✓ Published0🌍 Public
CCameron-Grams
Last edited May 16, 2016
Created on Jul 21, 2021

This example shows a minimal character-level language model built with a vanilla recurrent neural network, trained on a plain text file to learn and generate sequences of characters. The visualization highlights the network’s hidden state dynamics and sampling process as it predicts subsequent characters. Implemented in Python using NumPy, the code defines a single-layer RNN with a tanh activation, applies backpropagation through time for gradient computation, and uses Adagrad for parameter updates. The training loop periodically samples from the model to display generated text, with loss values and sampled outputs printed for monitoring.

AI-generated description

Similar vizzes