Beatmup
NNets model serialization format

In Beatmup::NNets, neural networks can be serialized into and reconstructed from a YAML-like piece of text.

The text representation is generated by beatmup_keras Python module providing a way to convert a TensorFlow/Keras model into a Beatmup model. Also, any instance of Beatmup::Model can be serialized in the text form by using Beatmup::NNets::Model::serializeToString().

Beatmup::NNets::DeserializedModel is suggested to be used to construct a model from its text representation and run the inference.

The text representation of a model contains sections ops and connections listing operations and connections between them. It does not contain model data (e.g., convolution filters and biases), but only the model structure; Beatmup::ChunkCollection and its subclasses are suggested to be used to store the model data.

Every operation and connection block is filled with its corresponding parameters values. The keywords mostly correspond to the operations constructors arguments put in snake case (see Operations serialization and Connections serialization for the detailed descriptions). The values are numeric or in plain text.

Example:

ops:
- _name: convolution
_type: conv2d
activation: brelu6
input_channels: 3
kernel_size: 3
output_channels: 16
use_bias: true
- _name: pool
_type: pooling2d
operator: max
size: 2
- _name: fc
_type: dense
output_dims: 4
use_bias: true
- _name: final
_type: softmax
connections:
- from: convolution
to: pool
- from: pool
to: fc
- from: fc
to: softmax

Detailed reference: