Home | Develop | Download | Contact
test_fcnn_training_load.cpp
1 #include <Pds/Ra>
2 #include <Pds/Nn>
3 #include "extras.h"
4 
5 int main(void)
6 {
7  Pds::Matrix X(Pds::Ra::TextFormat,"../test/data_x_yinyang.txt");
8  Pds::Matrix Y(Pds::Ra::TextFormat,"../test/data_y_yinyang.txt");
9  Pds::Matrix Ys(Y.Size());
10 
11  Pds::FCNn NN0("../test/NeuralNettwork0.txt",Pds::Sigmoid,Pds::DSigmoid);
12 
13  for(unsigned int k=0;k<10;k++)
14  {
15  NN0.Training(X,Y,0.1,0.01);
16 
17  NN0.Evaluate(X,Ys);
18 
19  std::cout<<"Test["<<k<<"]\t";
20  std::cout<<"Accuracy %: " <<100.0*Pds::Accuracy(Ys.Geq(0.5),Y)<<"\t";
21  std::cout<<"MeanAbsError %: "<<100.0*Pds::MeanAbsoluteError(Ys,Y)<<std::endl;
22  }
23 
24  pds_octave_plot_vector(X,Y ,"x_1","x_2","testando.m","dataset_data_Y.png");
25  pds_octave_plot_vector(X,Ys,"x_1","x_2","testando.m","dataset_data_Ys.png");
26 
27  NN0.Save("../test/NeuralNettwork0.txt");
28  return 0;
29 }
La clase tipo Pds::FCNn . Esta clase genera un objeto con dos parametros Nlin y Ncol....
Definition: FCNn.hpp:61

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed