Skip to content

kostas1507/nn.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nn.c

This is a minimal implementation of a neural network in C that should shed some light on how neural networks learn.

It aims to be as transparent as possible by using only C with no external functions.

The network uses the softsign activation function and mean squared error (MSE) loss function (to avoid pow()).

It has a fixed architecture: two inputs, one hidden layer with two neurons, and one output. It can learn logic gates.

Because everything is static and the network is very small, gradient calculation functions can be pre-computed, so backpropagation does not need to be implemented.

Note: This project will not be very helpful if you have no idea how neural networks work. For that you should checkout Karpathy's video.

About

Simplest possible implementation of a neural network in C.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages