2022-01-01 17:28:20 +01:00
|
|
|
#include <iostream>
|
2022-01-18 13:03:53 +01:00
|
|
|
#include "annclasses.h"
|
2022-01-01 21:58:15 +01:00
|
|
|
|
2022-01-01 17:28:20 +01:00
|
|
|
using namespace std;
|
|
|
|
|
2022-01-01 21:58:15 +01:00
|
|
|
|
2022-01-01 17:28:20 +01:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2022-01-01 21:58:15 +01:00
|
|
|
Tools::activate_randomness();
|
|
|
|
|
|
|
|
|
|
|
|
cout << "Bonjour et bienvenu" << endl;
|
2022-01-15 01:30:58 +01:00
|
|
|
|
2022-02-07 09:42:23 +01:00
|
|
|
Network network(2, 3);/*
|
2022-01-15 01:30:58 +01:00
|
|
|
network.print();
|
2022-01-15 22:49:02 +01:00
|
|
|
cout << endl << endl;
|
2022-01-18 13:27:55 +01:00
|
|
|
network.train({1.0,1.0,1.0}, {1.0,2.0,3.0}, 0.001, 100000);
|
2022-01-15 22:49:02 +01:00
|
|
|
//network.print();
|
|
|
|
cout << endl << endl;
|
2022-02-07 00:57:27 +01:00
|
|
|
network.print();*/
|
2022-02-07 09:42:23 +01:00
|
|
|
network.train({{1.0,1.0,1.0},{2.0,1.0,1.0}}, {{1.0,2.0,3.0},{1.0,2.0,6.0}}, 0.001, 1000000, 1);
|
2022-02-07 00:57:27 +01:00
|
|
|
cout << "Network has " << network.get_neurons_number() << " neurons" << endl;
|
2022-02-07 09:42:23 +01:00
|
|
|
for(auto e : network.predict({{1.0,1.0,1.0},{2.0,1.0,1.0}},true))
|
2022-02-07 00:57:27 +01:00
|
|
|
{
|
|
|
|
cout << e << " " << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
//vector<vector<float>> v(5);
|
|
|
|
//cout << v.at(0).size() << endl;
|
2022-01-15 21:36:05 +01:00
|
|
|
|
2022-01-01 21:58:15 +01:00
|
|
|
return 0;
|
2022-01-01 17:28:20 +01:00
|
|
|
}
|