This page was generated from docs/developer/UML-diagrams.ipynb. Interactive online version:
UML diagrams for Rockpool
This notebook contains UML diagrams for the main packages and SW architecture of Rockpool.
# - Load UML diagrams image from PIL import Image from pathlib import Path im = Image.open(Path('uml', 'UML-diagrams.png'))
Module base and core derived classes, and combinators
Module base class as well as all derived classes are under the
nn.modules package. All user-defined modules as well as back-end base classes derive from
ModuleBase is not designed as a user-facing class, and defines most of the features of
Module adds a facility for a post-initialisation callback on instantiation, used by some derived base classes.
Combinators used to build networks are in the package
nn.combinators. These are adapted within
nn.combinators for specific computational back-ends.
im.crop([0, 0, 2450, 1800])
Torch core modules
Derived Modules for specific back-ends are under
nn.modules, in sub-packages named by backend. Some backends require derived base classes to operate; e.g.
TorchModule. All derived modules using
jax inherit from
JaxModule, and likewise for
TorchModule also supports direct conversion of torch modules imported from
im.crop([2700, 0, 4750, 1400])
Classes for managing parameters are in the package
SimulationParameter derive from
Constant() is a special class which wraps any other class, permitting Rockpool to identify that a constant argument should not be trainable.
im.crop([7450, 0, 9000, 800])
Hardware support packages
All hardware support packages are placed under
devices. At present only
devices.xylo is supported. See the documentation for Xylo for more information about these classes.
Different hardware versions are supported by providing sub-packages for each device. Within these subpackages are duplicate-named classes which support the corresponding specific device version.
AFESamna etc. for the SYNS61201 device. Likewise
AFESamna etc. for the SYNS61300 device.
im.crop([5000, 0, 7000, 1200])
Computational graph representation
All classes used to serialise and represent Rockpool modules in a computational graph are under the package
graph contains the base class
GraphModule, from which all derived
GraphModule classes should inherit. It also provides
graph.utils provides a number of utility functions for manipulating graphs
im.crop([0, 3500, 2300, 5750])
Training and transformations
training contains several sub-packages with useful functions for defining losses, regulariation, and training approaches.
transform contains sub-packages for parameter and network transformations. Currently only the package
transform.quantize_methods is supported, providing methods for post-traning quantization for Xylo.
The beta implementation of QAT functionality for
torch modules is under
im.crop([2400, 3500, 4600, 5200])