Skip to content
Back to the catalog
Project neural-networkSystemsBeginnerReady to build

A Neural Network from Scratch

Build and train a neural network from first principles: forward pass, loss functions, and gradient descent optimization.

Build it in your language

The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.

Guide language

The stage guides read in this language. Only languages this project is fully translated into show up here; the interface language does not change.

What this project is about

Modern machine learning often feels mysterious behind massive frameworks like PyTorch or TensorFlow, but its core foundations are elementary arithmetic: weighted sums, non-linear activation functions, and gradient calculation using the chain rule.

In this project, you will build the training engine of a neural network from scratch without external machine learning dependencies. You will implement the affine combination of an artificial neuron, activations like ReLU and Sigmoid, loss metrics like MSE and BCE, and the gradient descent optimization loop to classify data deterministically.

Roadmap

6 stages across 3 phases. Every stage comes with its guide and its tests: you move on when they pass.

  1. Phase 12 stages

    Forward Pass and Activations

    Compute the linear combination of weighted inputs and apply non-linear activation functions.

    1. 01The Artificial Neuron and Linear Combination
    2. 02Non-linear Activation Functions
  2. Phase 22 stages

    Loss Metrics and Gradients

    Measure prediction error using MSE and BCE, and update parameters using gradient descent.

    1. 01Loss Functions and Error Metrics
    2. 02Gradient Descent Parameter Update
  3. Phase 32 stages

    Full Training and Inference

    Execute complete optimization epochs and perform deterministic predictions on binary classification.

    1. 01The Training Epoch and Backpropagation
    2. 02Convergent Training and Inference

Before you start

A CLI engine for neural computation, backpropagation, and training that processes JSON payloads, executes gradient descent optimization epochs, and classifies logical patterns.

  • container-runtime
    Beta

    Build your own container

    namespaces, cgroups and chroot. Isolate a process by hand and understand what Docker does when it starts an image.

    Expert8 stages~16 hSystems
    namespacescgroupsprocesos

    Go · C · Rust

  • garbage-collector
    Beta

    A garbage collector

    Mark-and-sweep from scratch. Manage memory the way the runtimes you use daily do without you noticing.

    Expert9 stages~18 hSystems
    memoriamark & sweeppunteros

    C · C++ · Rust

  • shell
    Beta

    Build your own shell

    fork, exec, pipes and redirection. Build a POSIX command interpreter that runs real programs.

    Intermediate12 stages~14 hSystems
    procesosforkexec+2

    C · Rust · Go · Zig