N3Lib - Neural Network Library



A C library for building neural networks with the capability to define custom activation functions, learning rate, bias and others parameters.

Both forward and backpropagation are built to parallelize through threads the operations.

In forward propagation each layer execute the activation functions in concurrent threads, when one layer end its own job, the results to the each next layer's neuron are collected with others concurrent threads. The whole process is executed from each layer from the input one to the output one.

In backward propagation first there is the delta evaluation from the output layer to the input layer, after that there is the weight updating process from the input to the output. Each return to the previous layer and delta evaluation on neurons in the same layer, is built, even in this case, with concurrent threads.

Due to the list type structure of layers and neurons, N3 Library allow you to remove and add neurons or layers even while it's in running mode ( at the end of each iteration ).

Install & Download

The library is designed to run under GNU\Linux operating systems.

You can compile it with the following commands:

$ make
# make install

To clean the main folder you can run make clean. To uninstall make uninstall as root user.


  • debug=true add the arguments -g -Ddebug_enable -pg
  • extra=true add the arguments -Wall -Wextra -ansi -pedantic
  • flags=arguments add the arguments specified
  • destdir=mydir install the library in the specified path mydir


The library is written to use Doxygen to generate up-to-date documentation and man pages. You can update the docs executing the following command:

doxygen n3lib.doxygen.conf

And install man pages by:

# make install doc

Documentazione Online

Sources Navigation