No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 787B

1234567891011121314151617181920212223242526272829303132
  1. #include <iostream>
  2. #include "annclasses.h"
  3. using namespace std;
  4. int main(int argc, char *argv[])
  5. {
  6. Tools::activate_randomness();
  7. cout << "Bonjour et bienvenu" << endl;
  8. Network network(2, 3);/*
  9. network.print();
  10. cout << endl << endl;
  11. network.train({1.0,1.0,1.0}, {1.0,2.0,3.0}, 0.001, 100000);
  12. //network.print();
  13. cout << endl << endl;
  14. network.print();*/
  15. 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);
  16. cout << "Network has " << network.get_neurons_number() << " neurons" << endl;
  17. for(auto e : network.predict({{1.0,1.0,1.0},{2.0,1.0,1.0}},true))
  18. {
  19. cout << e << " " << endl;
  20. }
  21. //vector<vector<float>> v(5);
  22. //cout << v.at(0).size() << endl;
  23. return 0;
  24. }