r/learnmachinelearning • • Apr 21 '25

Project I’m 15 and built a neural network from scratch in C++ — no frameworks, just math and code

1.8k Upvotes

I’m 15 and self-taught. I'm learning ML from scratch because I want to really understand how things work. I’m not into frameworks. I prefer math, logic, and C++.

I implemented a basic MLP that supports different activation and loss functions. It was trained via mini-batch gradient descent. I wrote it from scratch, using no external libraries except Eigen (for linear algebra).

I learned how a Neural Network learns (all the math) -- how the forward pass works, and how learning via backpropagation works. How to convert all that math into code.

I’ll write a blog soon explaining how MLPs work in plain English. My dream is to get into MIT/Harvard one day by following my passion for understanding and building intelligent systems.

GitHub - https://github.com/muchlakshay/MLP-From-Scratch

This is the link to my GitHub repo. Feedback is much appreciated!!


r/learnmachinelearning • • Dec 30 '25 Diamonds are Forever This Hooray WOW Bravo

Project I implemented a Convolutional Neural Network (CNN) from scratch entirely in x86 Assembly, Cat vs Dog Classifier

Thumbnail
gallery
1.8k Upvotes

As a small goodbye to 2025, I wanted to share a project I just finished.

I implemented a full Convolutional Neural Network entirely in x86-64 assembly, completely from scratch, with no ML frameworks or libraries. The model performs cat vs dog image classification on a dataset of 25,000 RGB images (128×128×3).

The goal was to understand how CNNs work at the lowest possible level, memory layout, data movement, SIMD arithmetic, and training logic.

What’s implemented in pure assembly: Conv2D, MaxPool, Dense layers ReLU and Sigmoid activations Forward and backward propagation Data loader and training loop AVX-512 vectorization (16 float32 ops in parallel)

The forward and backward passes are SIMD-vectorized, and the implementation is about 10× faster than a NumPy version (which itself relies on optimized C libraries).

It runs inside a lightweight Debian Slim Docker container. Debugging was challenging, GDB becomes difficult at this scale, so I ended up creating custom debugging and validation methods.

The first commit is a Hello World in assembly, and the final commit is a CNN implemented from scratch.

Github link of the project

Previously, I implemented a fully connected neural network for the MNIST dataset from scratch in x86-64 assembly.

I’d appreciate any feedback, especially ideas for performance improvements or next steps.


r/learnmachinelearning • • May 14 '20

Discussion I created opencv object tracker which can write in air

1.8k Upvotes

r/learnmachinelearning • • Mar 03 '26

Discussion Are we overusing Deep Learning where classical ML (like Logistic Regression) would perform better?

1.7k Upvotes

With all the hype around massive LLMs and Transformers, it’s easy to forget the elegance of simple optimization. Looking at a classic cost function surface and gradient descent searching for the minimum is a good reminder that there’s no magic here, just math.

Even now in 2026, while the industry is obsessed with billion-parameter models, a huge chunk of actual production ML in fintech, healthcare, and risk modeling still relies on classical ML.

A well-tuned logistic regression model often beats an over-engineered deep model on structured tabular data because it’s:

  • Highly interpretable

  • Blazing fast

  • Dirt cheap to train

The real trend in production shouldn't be “always go bigger.” It’s using foundation models for unstructured data, and classical ML for structured decision systems.

What you all are seeing in the wild. Have any of you had to rip out a DL model recently and replace it with something simpler?


r/learnmachinelearning • • Dec 15 '19

Identical Twins no longer fool Visual AI! - (BTW: I'm the black dude from 2 weeks ago whose AI kept classifying as Obama lol 😅). I gotta say, I'm pretty happy with this progress! ^__^

Post image
1.7k Upvotes

r/learnmachinelearning • • Apr 09 '24

OpenAI was founded 9 years ago

Post image
1.7k Upvotes

r/learnmachinelearning • • Apr 18 '20

Project After a week of training trying various parameters I finally managed to get an AI to learn how to play a game with an Xbox controller . I documented my journey here : https://youtu.be/zJdZ-RQ0Fks . That was pretty fun . I will try to do more of this type of stuff in the future .😁😁😁😁

1.6k Upvotes

r/learnmachinelearning • • Aug 02 '25

Just Completed 100 Days of ML ...From confused student to confident Coder

Post image
1.6k Upvotes

Hey Reddit fam! 👋 After 100 days of grinding through Machine Learning concepts, projects, and coding challenges — I finally completed the #100DaysOfMLCode challenge!

🧠 I started as a total beginner, just curious about ML and determined to stay consistent. Along the way, I learned:

Supervised Learning (Linear/Logistic Regression, Decision Trees, KNN)

NumPy, Pandas, Matplotlib, and scikit-learn

Built projects like a Spam Classifier, Parkinson’s Disease Detector, and Sales Analyzer

Learned to debug, fail, and try again — and now I’m way more confident in my skills

Huge shoutout to CampusX’s YouTube series and the awesome ML community here that kept me motivated 🙌

Next up: Deep Learning & building GenAI apps! If you’re starting your ML journey, I’m cheering for you 💪 Let’s keep learning!


r/learnmachinelearning • • Jan 08 '21

Difference in Image Classification, Semantic Segmentation, Object Detection, and Instance Segmentation

Post image
1.6k Upvotes

r/learnmachinelearning • • Aug 17 '25

Meme "When you thought learning Python was the final boss, but it was just the tutorial."

Post image
1.6k Upvotes

r/learnmachinelearning • • Jun 12 '21

Project I Wrote A Program To Help Me Visualize Optimization With Gradient Descent

1.6k Upvotes

r/learnmachinelearning • • Jul 11 '21

Discussion This AI Reveals How much time politicians stare at their phone at work

Post image
1.6k Upvotes

r/learnmachinelearning • • Jun 21 '20

Project I printed a second Xbox arm controller and decided to have an air hockey AI battle . I used unity to make the game and unity ml-agent to handle all the reinforcement learning thing . It is sim to real which I am quite happy to have achieved even if there is so much that could be improved .

1.6k Upvotes

r/learnmachinelearning • • Nov 08 '19

Discussion Can't get over how awsome this book is

Post image
1.6k Upvotes

r/learnmachinelearning • • Sep 30 '21

Project Still a work in progress but I trained an agent in Unity (ML-agent package) to drive an RC car through gates . I am planning to get it to control a real RC car . I have been told many times that I should not go thought the actual controller but I like making these little robots too much!

1.6k Upvotes

r/learnmachinelearning • • Feb 21 '21

Overfitting

Post image
1.5k Upvotes

r/learnmachinelearning • • May 01 '21

Discussion Types of Machine Learning Papers

Post image
1.5k Upvotes

r/learnmachinelearning • • Jul 21 '24

Discussion Lads, we ain't sleeping

Post image
1.5k Upvotes

r/learnmachinelearning • • Jul 19 '20

Project Built a Real-time Sudoku Solver! Basic Image Processing + a little Deep Learning. It's quite intriguing how simple pieces of codes can do magical stuff! Check the thread for the GitHub repo and references!

1.5k Upvotes

r/learnmachinelearning • • Feb 12 '21

Project I can smell some TinyML in there! 👃

1.4k Upvotes

r/learnmachinelearning • • May 28 '24

um…it seems Elon doesn’t know who Yann LeCun is.

Thumbnail
gallery
1.4k Upvotes

r/learnmachinelearning • • Jul 24 '20

Project Hi guys, I've made a Personalized Face Mask Detector. Im still pretty new to ML but I've taken a couple courses and thought I should build something relevant for today's situation. It only allows access if the mask is worn correctly, i.e. over the Mouth and Nose. Please let me know what you think

1.4k Upvotes

r/learnmachinelearning • • Aug 26 '20

Project This is a project to create artificial painting. The first steps look good. I use tensorflow and Python.

Post image
1.4k Upvotes

r/learnmachinelearning • • Jan 22 '20

Misleading Neural Networks Cheat Sheet

Post image
1.4k Upvotes