I

I built a deep learning engine from scratch in Python

Hacker News

I built a deep learning engine from scratch in Python

I’ve spent the last few months building a deep learning engine completely from scratch in Python (using only math and random). What started as a basic linear algebra calculator project grew into a symbolic tensor system with autodiff, custom matrix ops, attention mechanisms, LayerNorm, GELU, and even a text generation demo trained on the Brown corpus. I'm still an undergrad, so my main goal is to deeply understand how deep learning actually works under the hood - gradients, attention, backpropagation, optimizers - by building it step-by-step with full visibility into everything, and without relying on big frameworks or libraries. It’s not fast or production-ready, but that’s not the point. As of now, it’s more so aimed at exploration and understanding. I mainly wanted to explore how deep learning works by building it through first principles. It’s still a work in progress (lots to learn and improve in terms of structure, docs, and performance), but I figured it was worth sharing. I’d love any feedback, questions, ideas, or even just thoughts about what you’d add, change, or do differently. Thanks for reading!

Share card

Actual performance

30points
3comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: using · Missing: mac, agents, macos
82%82% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
79%79% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
61%61% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
49%49% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: month · Missing: mobile apps, ios, personal
48%48% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
22%22% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

*F
*From Scratch* Implementations of Deep Learning Concepts (in Numpy)71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

*From Scratch* Implementations of Deep Learning Concepts (in Numpy)

Hacker News2
Fr
Free textbook – Python, Deep Learning and LLMs from scratch [pdf]72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Free textbook – Python, Deep Learning and LLMs from scratch [pdf]

Hacker News1
I
I wrote a minimal deep learning library from scratch in Python71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I wrote a minimal deep learning library from scratch in Python

Hacker News25
Gi
Git, from scratch, in Python, Spelled out72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Git, from scratch, in Python, Spelled out

Hacker News20
I
I built a small browser engine from scratch in C++54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I built a small browser engine from scratch in C++

Hacker News146
AP
API monetization with its own billing engine built from scratch51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

API monetization with its own billing engine built from scratch

Hacker News1
Au
Autocomplete Python with Deep Learning78%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Autocomplete Python with Deep Learning

Hacker News109
Do
Document Management System from Scratch (in Python)56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Document Management System from Scratch (in Python)

Hacker News1
I
I launched Claritask (built from scratch in the open; not a programmer)60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I launched Claritask (built from scratch in the open; not a programmer)

Hacker News15
De
Deep learning framework from scratch, trains GPT-2 in 3 days68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Deep learning framework from scratch, trains GPT-2 in 3 days

Hacker News2