# Dobiasd/frugally-deep

A lightweight header-only library for using Keras (TensorFlow) models in C++.

Repository: https://github.com/Dobiasd/frugally-deep
Canonical: https://ross.abutalabs.com/products/frugally-deep
Language: C++
License: MIT
License Family: permissive
Topics: tensorflow, deep-learning, keras, cpp, cpp14, header-only, library, c-plus-plus, c-plus-plus-14, convolutional-neural-networks, prediction, machine-learning, python, keras-models, tinyml, edge-computing
Last push: 2026-05-06T15:11:16+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 81, release rhythm 82, longevity 100
- inputs: {"age_days": 3701, "days_push": 119, "days_rel": 122, "gap_med": 2.0, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1128, forks 237 (observed 2026-08-28T04:03:41.641365+00:00)

## What it is
frugally-deep is a lightweight header-only C++ library for running inference (forward passes) on Keras/TensorFlow models without linking against TensorFlow. It re-implements the subset of TensorFlow operations needed for prediction, supporting sequential and functional-API models on CPU.

## Use cases
- run keras models in c++ without tensorflow
- deploy trained neural network in c++ application
- small binary size deep learning inference
- cpu-only model prediction in embedded or edge application
- load keras model file in c++
- parallel batch inference on multiple cpu cores
- avoid tensorflow dependency in production c++ build

## When to choose
- you trained a model in Keras and need C++ inference without TensorFlow's large dependency
- binary size and easy integration matter more than GPU acceleration
- you need fast single-core prediction with easy multi-core scaling
- targeting 32-bit or resource-constrained environments

## When to avoid
- you need GPU acceleration for inference
- you need training, not just prediction
- your model uses layer types or operations outside the supported subset

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, llm-inference
- domain: deep-learning, machine-learning, cross-platform
- platform: cpp, cross-platform
- tags: keras, tensorflow, header-only, inference, neural-networks, edge-computing, tinyml, cpu-only

## Member repositories
- Dobiasd/frugally-deep (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:41.641365+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-30T06:38:28.385226+00:00, confidence not recorded.
  - readme: https://github.com/Dobiasd/frugally-deep (fetched 2026-08-28T04:03:41.641365+00:00, sha 8c01e24a0a29)
- Data as of 2026-08-30T08:39:29.467469+00:00.
