Sonnet is a TensorFlow-based neural network library designed to provide simple, composable abstractions for machine learning research.
Sonnet addresses the need for a clear, unopinionated framework for constructing neural networks by centering its design around a single concept: the Module. Each module can hold references to parameters, other modules, and methods that apply functions to user input. The library ships with predefined modules such as Linear, Conv2D, and BatchNorm, as well as predefined networks like MLP, but encourages users to build their own custom modules. A key aspect of Sonnet's approach is that modules are self-contained and entirely decoupled from one another, allowing maximum flexibility in how they are used together.
Sonnet is well-suited for researchers and teams building custom machine learning systems who want clear, understandable abstractions without being locked into a particular training framework or workflow. The library deliberately does not ship with a training framework, instead encouraging users to build their own or adopt frameworks from other sources. This makes it particularly valuable for organizations that have developed their own training patterns or need to integrate neural network components into existing systems. The design prioritizes code clarity and transparency, with explicit documentation of default choices such as parameter initialization schemes.
Development activity shows consistent engagement with the codebase through regular updates and maintenance. The project maintains comprehensive documentation and provides multiple worked examples covering different use cases, from basic supervised learning to generative models and distributed training scenarios. The library demonstrates active support for modern TensorFlow practices and continues to evolve in response to research needs.