Home | Develop | Download | Contact
example_fcnn_training_load.cpp
1 
35 #include <Pds/Ra>
36 #include <Pds/Nn>
37 
38 int main(void)
39 {
40  Pds::Matrix X(Pds::Ra::TextFormat,"../test/data_x_yinyang.txt");
41  Pds::Matrix Y(Pds::Ra::TextFormat,"../test/data_y_yinyang.txt");
42  Pds::Matrix Ys(Y.Size());
43 
44  Pds::FCNn NN0("../test/NeuralNettwork0.txt",Pds::Sigmoid,Pds::DSigmoid);
45 
46  for(unsigned int k=0;k<10;k++)
47  {
48  NN0.Training(X,Y,0.1,0.01);
49 
50  NN0.Evaluate(X,Ys);
51 
52  std::cout<<"Test["<<k<<"]\t";
53  std::cout<<"Accuracy %: " <<100.0*Pds::Accuracy(Ys.Geq(0.5),Y)<<"\t";
54  std::cout<<"MeanAbsError %: "<<100.0*Pds::MeanAbsoluteError(Ys,Y)<<std::endl;
55  }
56 
57  NN0.Save("../test/NeuralNettwork0.txt");
58  return 0;
59 }
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