Skip to content

parcoor/nnc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NNC Neural Network in C - By Parcoor

This library allows to build, train, store and use neural networks.

It is written entirely in C, with no external dependencies to e.g. linear algebra libraries. Thus it can run out-of-the-box on (almost) any device. It also easily allows a very fine level of inner control and observability.

Examples

The folder examples shows different ways to use this library:

  • init_store_load shows how to initialize a neural network, persist it and re-load it from the disk. Compile with make init_store_load
  • sin_history shows how to use NNC for a regression task (approximating a sinus function) and store the training history in a csv file. Compile with make sin_history
  • xor_training_cyclical shows how to use NNC for a classification task, with cyclical learning rates. Compile with make xor_training_cyclical

Structure

  • architecture.h contains the definition of the different bricks to build a neural network, such as the neural network itself, a layer, a neuron.
  • activation.h contains the definition of the different activation functions that can be used for the layers.
  • losses.h contains the definition of the loss function that can be used to train a neural netwwork through backpropagation, depending on the task at hand (regression, classification...)
  • metrics.h contains metrics that can be used to assess a neural network training or inference.