Iris is an experimental neural network engine, built from scratch with C++.
To try the iris engine, create a main.cpp
file in the root directory, then use the example code below by placing it inside:
#include "include/iris.hpp"
using namespace iris;
int main(int argc, char** argv)
{
Network inet = Network({ Layer(3),
Layer(2),
Layer(3) });
inet.setInput({ 1, 0, 1 });
inet.setTarget({ 1, 0, 1 });
inet.train(100);
inet.describe();
return 0;
}
Where:
Network
is the neural network engine, the constructor receives a vector ofLayer
.Layer
specifies a new layer, where3
,2
and3
are the amount of neurons inside each layer.setInput()
adds the input to the network, where{0, 1, 3}
is the input vector.setTarget()
sets the expected output, where{3, 2, 4}
is the output vector.train()
starts the training process, where100
are the epochs, information will be displayed over each epoch showing the global error.describe()
prints every layer and every neuron inside the network, exposing its information, including inputs, topology, outputs, and the errors.
To build and run the project, use CMake:
$ cmake .
$ make
$ ./out/iris
The Iris engine is distributed under the Apache 2.0 License.