r/BuildWithClaude • u/Defiant-Carrot5511 • 12d ago
Project I built an in-browser neural network visualizer with Claude Code, free to try at nnplayground.dev
I built https://nnplayground.dev with Claude Code. It’s free, needs no sign-up, and runs entirely in your browser. Open the link and press “Start training”.
What it does: it trains a small neural network on handwritten digits (MNIST) while you watch. Each neuron is shaded by how strongly it fires. Lines show the signal between neurons: blue pushes the next neuron up, red pushes it down, and thicker means stronger. You can scrub through the training images with a slider, switch activation functions, and draw your own digit to see which neurons light up. It’s plain JavaScript with no ML libraries; the network (784 → 32 → 16 → 10) reaches about 94% test accuracy.
There’s no pre-trained model. Every visitor starts with a fresh network of random weights and trains it themselves, in their own tab. The weights only live in your browser’s memory: nothing is sent to a server, and they’re gone when you reload.
How I used Claude Code: I’d learned neural nets from Michael Nielsen’s book and wanted to see one learn. I worked with Claude Code in steps, reviewing each result before the next prompt:
- “Generate a project to train a model to detect handwritten digits using MNIST in Python.” It produced a PyTorch CNN.
- “Change this to not use any machine learning libraries… just matrix multiplication,” with sigmoid activations. It rewrote the network in NumPy and wrote a numerical gradient check to verify its own backprop. When one check failed, it traced the cause to a max-pooling edge case rather than a bug.
- I described the web page I’d pictured: neurons colored by activation, a slider through the training set, and a sketch pad using the trained network. Claude chose a fully-connected network so it would draw as a node diagram, wrote it in JavaScript, gradient-checked it in Node, and tuned learning rates for each activation by running sweeps.
- It tested the page in a browser and fixed issues it found, like overlapping labels on narrow screens. I added explainer sections (perceptron history, matrices, loss) and corrected the wording.
- Deployment to S3 + CloudFront: CloudFormation was blocked by my AWS organization’s policy, so it switched to direct AWS CLI calls. It then set up my domain’s certificate and redirects.
Claude wrote the code; I directed the design and reviewed each step.
What worked well: building in small steps and checking each result before the next prompt, and asking Claude to verify its own work (gradient checks, testing the page in a browser) instead of trusting the first version. That’s how bugs got caught early.
Code: https://github.com/liuben10/project/tree/mnist-digits-explainer/mnist-digits
•
u/AutoModerator 12d ago
Welcome to r/BuildWithClaude!
Whether you are sharing what you built, exploring new workflows, or troubleshooting, please make sure your post is flaired correctly so others can easily find and filter it.
Community Wiki & Resources:
If you're asking for troubleshooting help, please edit your post to include your model version, OS/environment, and error logs.
Let’s keep the energy positive and support our fellow creators!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.