vrishank

← Projects

AI / ML · PyTorch tensors only

BrainCells Open source

A neural network built using only raw PyTorch tensors: no torch.nn, no autograd. Forward pass, activations, loss, backprop and weight updates all written by hand.

I made a neural network from scratch using only PyTorch tensors. No torch.nn, no Autograd, no helpers — just raw tensors and a bunch of manual math.

BrainCells is me trying to understand how neural nets actually work. I built everything by hand: forward pass, activations, loss, backprop (with the chain rule, of course), and weight updates. It’s a simple feedforward network, but the whole point was to stop relying on magic and start figuring stuff out myself.

No fancy features here. Just basic code that made my brain hurt (in a good way) and helped me connect all the dots we usually ignore.

If you're into building things from the ground up or just want to grow a few brain cells, this might be your vibe.

GitHub repo

Detailed Blog

Source