https://github.com/michaeljwelsh/yannl
Yet another neural network library
https://github.com/michaeljwelsh/yannl
artificial-neural-networks blas c-plus-plus c-plus-plus-11 callbacks cblas classification feedforward-neural-network matrix neural-network portable regression
Last synced: about 1 year ago
JSON representation
Yet another neural network library
- Host: GitHub
- URL: https://github.com/michaeljwelsh/yannl
- Owner: MichaelJWelsh
- License: mit
- Created: 2017-03-28T01:51:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T15:26:13.000Z (over 8 years ago)
- Last Synced: 2025-04-07T20:21:22.697Z (about 1 year ago)
- Topics: artificial-neural-networks, blas, c-plus-plus, c-plus-plus-11, callbacks, cblas, classification, feedforward-neural-network, matrix, neural-network, portable, regression
- Language: C++
- Size: 1.9 MB
- Stars: 38
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Yannl
Yannl is a compact, portable, feed-forward artificial neural network library written in C++11. Yannl has no dependencies but can be easily optimized for matrix multiplication via callbacks (see integrating BLAS example for details).
## Features
* **Gradient Descent Algorithms**
* batch
* mini-batch
* stochastic
* **Activation Functions**
* sigmoid
* relu
* tanh
* softmax
* linear
* **Learning Rate Annealing**
* **L2 Regularization**
* **Momentum**
* **Fan-In Weight Initialization**
* **Serializability**
## Installation & Usage
To install, run following command from terminal :
```
sudo make
```
Use `LIB_PATH` and `INCLUDE_PATH` to install Yannl in a specific directory. By default, Yannl is installed at `/usr/local/lib` and header files are stored at `/usr/local/include`.
Include Yannl in your source via:
```C++
#include
```
At compilation, use `-lyannl` flag. i.e.
```
g++ foo.cpp -lyannl -std=c++11
```
## Example
Use the Makefile in the `examples` folder to run each example. Below is the `realistic_classification` example.
The neural network in this example is trained with a very large artificially generated training set. The goal is for it to be able to tell whether the sum of two numbers is positive or negative. The input is two floating-point numbers, and the output is either {1, 0} (positive), or {0, 1} (negative). After training, it is given seven sets of numbers and outputs a matrix classifying the sum of each set of numbers. In this case, the accuracy is 100%. Finally, the user can input their own data and see whether or not the neural network correctly classifies the sum.
