# itskonrad/miniMNIST-c

Repository: https://github.com/itskonrad/miniMNIST-c
Canonical: https://ross.abutalabs.com/products/minimnist-c
Language: C
License: MIT
License Family: permissive
Last push: 2024-10-04T16:13:38+00:00

## Health v2 (maintenance only)
Score: 22/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 51
- inputs: {"age_days": 717, "days_push": 698, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1284, forks 130 (observed 2026-08-28T04:04:14.527906+00:00)

## What it is
A minimal neural network written in roughly 200 lines of dependency-free, standard-library-only C that trains a two-layer MLP (ReLU hidden layer, softmax output) with SGD and cross-entropy loss to classify handwritten digits from MNIST. It is a compact educational demonstration of neural network fundamentals, reaching about 98% accuracy in ~2.7 seconds per epoch, rather than a reusable ML library.

## Use cases
- implement a neural network from scratch in C
- train a model on MNIST without any dependencies
- learn how backpropagation, ReLU, softmax, and cross-entropy work in plain code
- study a tiny readable codebase to understand SGD and mini-batch training
- see how fast a pure-C MLP can train on MNIST
- teaching example for an intro deep learning course

## When to choose
- you want to read and learn from a very small from-scratch neural network implementation in C
- you need a dependency-free teaching or self-study example covering the full train loop (forward pass, loss, gradients, SGD)
- you want a quick MNIST baseline that compiles with a single gcc command and runs on CPU

## When to avoid
- you need production ML capabilities such as GPU acceleration, convolutional layers, model saving/loading, or inference APIs
- you want a reusable library or framework to integrate into an application - it is a single monolithic program configured by editing constants in nn.c
- your task involves anything beyond MNIST-style dense inputs, e.g. images, text, or audio

## Facets
- artifact type: learning-resource
- maturity: stable
- function: machine-learning
- domain: machine-learning, deep-learning, education, tutorials
- platform: c, cross-platform, cli, windows
- tags: neural-network, mnist, from-scratch, handwritten-digit-recognition, sgd, softmax, relu, cross-entropy, minimal-implementation, standard-library-only, educational, linux, macos

## Member repositories
- itskonrad/miniMNIST-c (main) score 22

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:14.527906+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:56:44.689605+00:00, confidence not recorded.
  - readme: https://github.com/itskonrad/miniMNIST-c (fetched 2026-08-28T04:04:14.527906+00:00, sha 791d263a807e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
