# google-deepmind/sonnet

TensorFlow-based neural network library

Repository: https://github.com/google-deepmind/sonnet
Canonical: https://ross.abutalabs.com/products/sonnet
Homepage: https://sonnet.dev/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: machine-learning, artificial-intelligence, neural-networks, deep-learning, tensorflow
Last push: 2026-07-07T22:31:42+00:00

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

## Adoption (not part of the score)
Stars 9961, forks 1303 (observed 2026-08-28T04:10:38.991522+00:00)

## What it is
Sonnet is a Python library built on TensorFlow 2 that provides simple, composable abstractions (snt.Module) for constructing neural networks in machine learning research. Developed by DeepMind, it ships with predefined modules like Linear, Conv2D, and MLP while remaining unopinionated about training workflows.

## Use cases
- build neural networks for ML research in TensorFlow
- define MLPs and CNNs with composable modules
- prototype supervised and reinforcement learning models
- run distributed training on CIFAR-10 with snt.distribute
- train a GAN on MNIST in a Colab notebook

## When to choose
- you use TensorFlow 2 and want clean, composable module abstractions
- you're doing ML research and prefer building your own training loop
- you want DeepMind's battle-tested neural network building blocks

## When to avoid
- you want a full training framework with built-in trainers
- your project is PyTorch- or JAX-based
- you need a high-level Keras-style end-to-end API

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, artificial-intelligence
- platform: python
- tags: tensorflow, neural-networks, research, deepmind, modules

## Member repositories
- google-deepmind/sonnet (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:38.991522+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-29T17:20:03.914163+00:00, confidence not recorded.
  - readme: https://github.com/google-deepmind/sonnet (fetched 2026-08-28T04:10:38.991522+00:00, sha f2be0d4e66c7)
  - homepage: https://sonnet.dev/ (fetched 2026-08-29T08:19:51.416678+00:00, sha bc21809f9e4a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
