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:
Networkis the neural network engine, the constructor receives a vector ofLayer.Layerspecifies a new layer, where3,2and3are 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, where100are 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/irisThe Iris engine is distributed under the Apache 2.0 License.