A singular Riemannian geometry approach to Deep Neural Networks.
On the structure of the file containing the weights and the biases

This library reads the structure, the weights and the biases of a neural network from a text file structured as follows. The first line of the file contains the number of layers of the network. Starting from the second line, each layer is described in a block of three consecutive lines in the following way.

  • The first line of the block contains (separated by a tab character): the number of rows and columns of the weights matrix of the layer, the dimensions of the input and output spaces and the type of layer. Note that in the current implementation of the neural network, for the supported layer the number of rows coincides with the dimension of the output space and the number of columns coincides with the dimension of the input space.
  • The second line of the block contains the weights of the layer (separated by a tab character) in row-major form.
  • The third line of the block contains the biases of the layer (separated by a tab character).

Supported layers: For the moment the supported feedforward layer are:

  • Sigmoid layer "FC_LAYER_SG".
  • Softplus layer "FC_LAYER_SP".
  • Softmax layer "FC_LAYER_SM".
  • SiLu layer "FC_LAYER_SL".

Since in the paper "A singular Riemannian geometry approach to Deep Neural Networks II. Reconstruction of 1-D equivalence classes." the non-smooth ReLu layer has not been discussed yet, we did not implement this kind of layer, at least in the current version of the library.