C++ framework

C ++ framework is designed for creating spiking neural networks and training these with synaptic plasticity methods. Resulting neural networks can be executed on a central processor, an AltAI-1 neuromorphic processing unit, or a software emulator of the latter.

C ++ framework is a set of independent units that manage backends, transform the neural network representation into various formats, and select the optimal neural network to run. In the C++ framework, the functions that are not directly related to training and execution of spiking neural networks are implemented.

Using the C++ framework for Kaspersky Neuromorphic Platform, you can perform the following tasks:

The C++ framework is implemented within the framework namespace. The table below contains descriptions of the C++ framework components.

C++ framework components

Component

 

Description

coordinates

A namespace that contains the spatial coordinates of the neuron.

io

A namespace that contains the input, output, and storage namespaces.

 

input

A namespace that contains interfaces for accessing the input channel and the converter for data coming from the external environment.

 

output

A namespace that contains interfaces for accessing the output channels.

 

storage

A namespace that contains functions for loading and saving SpikeMessage messages.

monitoring

The namespace that contains the interface to the observer.

population

A namespace that contains functions for generating populations of neurons.

projection

A namespace that contains functions for generating synapse projections and generating synapses with default attribute values.

sonata

A namespace that contains functions to load and save the neural network in the SONATA format.

synchronization

A namespace that contains a function for getting the current state of the neural network from the backend.

BackendLoader

A class that implements a dynamic library loader.

Model

A class that implements the model.

ModelExecutor

A class that implements the model executor.

ModelLoader

A class that implements the model loader.

Network

A class that implements a neural network object.

The figure below shows how the C++ framework components interact.

In Kaspersky Neuromorphic Platform, a Network object can be loaded via the sonata namespace function. You also can define the way a Network object is displayed with a set of (arbitrary or user-defined) coordinates from the coordinates namespace. The state of the Network object can be updated from the Backend with the synchronization namespace function.

An object of the Network class, as well as the input and output channel containers implemented in the input and output namespaces, respectively, are stored in an object of the Model class. The input and output channels are used to convert data received by the neural network projections, as well as to convert messages from the neural network populations into one of the provided data formats. SpikeMessage messages are received in input channels and unloaded from output channels with storage namespace functions.

You can execute an object of the Model class using the start() function of the ModelExecutor class object. An object of the ModelExecutor class also contains an object of the MessageObserver class from the monitoring namespace, which processes the received messages in accordance with the specified function, and an object of the ModelLoader class that have the functions you can use to load model to the exact .backend instance. To execute the model in the backend instance, a pointer to the backend instance received from the BackendLoader class object is passed to the ModelExecutor class object.

Diagram of interactions between the C++ framework components

In this section

sonata namespace

coordinates namespace

synchronization namespace

storage namespace

population namespace

projection namespace

Input namespace

output namespace

monitoring namespace

Network class

Model class

BackendLoader class

ModelLoader class

ModelExecutor class

See also

sonata namespace

Kaspersky Neuromorphic Platform architecture

Page top