# glouw/tinn

A tiny neural network library

Repository: https://github.com/glouw/tinn
Canonical: https://ross.abutalabs.com/products/tinn
Language: C
License: MIT
License Family: permissive
Topics: tiny, neural, network, ansi, c, feed, forward, back, propagation
Last push: 2021-01-17T23:06:12+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3081, "days_push": 2054, "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 2133, forks 189 (observed 2026-08-28T04:06:17.348465+00:00)

## What it is
Tinn is a tiny, dependency-free neural network library written in under 200 lines of C99, implementing a feedforward network with one hidden layer and sigmoidal activation trained via backpropagation. It is designed for portability and embedded systems, where a model can be trained on a desktop and loaded onto a microcontroller for inference.

## Use cases
- train a tiny neural network in C for handwritten digit recognition
- run neural network inference on a microcontroller or embedded device
- learn how backpropagation works by reading a minimal implementation
- embed a small feedforward network in a C or C++ project without dependencies
- predict real-time sensor events from an ADC using a pretrained model
- use a neural network where only the C standard library is available

## When to choose
- you need an extremely small, dependency-free neural network for embedded or constrained environments
- you want readable, minimal source code to study or modify neural network fundamentals
- your model fits a simple feedforward architecture with one hidden layer

## When to avoid
- you need deep architectures, convolutions, GPUs, or modern training features
- you want a fully featured neural network library like Kann, Genann, PyTorch, or TensorFlow
- you need built-in multithreading, random seeding, or data shuffling utilities

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, embedded-systems, developer-tools
- platform: cross-platform, embedded, c
- tags: neural-network, feedforward, backpropagation, minimalist, single-hidden-layer, c99, dependency-free, microcontroller

## Member repositories
- glouw/tinn (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:17.348465+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-30T02:52:00.078846+00:00, confidence not recorded.
  - readme: https://github.com/glouw/tinn (fetched 2026-08-28T04:06:17.348465+00:00, sha d82065a89a86)
- Data as of 2026-08-30T08:39:29.467469+00:00.
