ML Feed

Building a C++ to Python Tensor Library: Adding SGD and training an MLP

In the last post, we added basic autograd to our library, including things like nodes, thin tensor handles, graph building functions, and a bunch of helper functions. In this post, we’ll use the framework we just created, expanding functionality to work towards a trainable MLP using stochastic gradient descent (SGD). This post will focus on…

Building a C++ to Python Tensor Library: Adding Autograd

We’ve gotten to the point with our tensor library that it’s probably a good time to add autograd: We have basic math functionality, we have the ability to test in Python, and we have a flexible class framework that can be expanded to handle autograd. In this post, we’ll build out the most basic version…

Building a Tensor-Based Calculator with CUDA

Come along with me in this post as we create a C++ CUDA tensor calculator! This is part of a larger project to recreate a high-performance neural network tool library: Starting from the ground level of writing tensor classes that execute on GPU hardware, and building to an eventual PyTorch-style library for building simple machine…

Building a Convolutional Neural Network(CNN) from scratch

After dipping my toe into machine learning(ML) in the form of building an MNIST handwritten digit classifier from scratch, without using any libraries other than the most excellent and honorable NumPy, I found myself hungry for more. While I don’t plan to continue building historical model architectures from scratch forever(because it takes positively forever), building…

Building a neural net from scratch: Code Implementation

In this post, let’s get right into the code! Let’s start out by defining a basic neural network. There will be many more utility functions to write soon, but this will at least give us a basic idea of what things will look like. Our network will be comprised of layers, biases, and weights, and…

Building a neural net from scratch: Motivation and Architecture

In the Machine Learning (ML) world, the equivalent of a hello world program is building a handwritten digit classifier using a neural network. I decided to take building a digit classifier on as my first project, just dipping my toe into ML and AI, to see if it was something I could compete in. There…