For example: 784 input neurons, 30 hidden neurons and 10 output neurons, all using the sigmoid function
std::vector<std::pair<int,int>> layers = {{784,Neuron::NeuronMode::SIGMOID},{30,Neuron::NeuronMode::SIGMOID}, {10,Neuron::NeuronMode::SIGMOID}};
Network network = Network(layers);
network.train(trainingData,0.05,0.4,100);
std::vector<float> predictions = network.predict(testData);
Get the highest prediction, with wich you can read from predictions:
int index = network.highestPred(predictions);
You may experience some bugs or other weird stuff. Please open an issue or open a pull request if needed.
Training data in the MNIST database from http://yann.lecun.com/exdb/mnist/
- Retraining the network after training finishes doesn't work