Home | Develop | Download | Contact
example_fclayer_create.cpp
1 
69 #include <Pds/Ra>
70 #include <Pds/Nn>
71 
72 int main(void)
73 {
74  // Layer with {2 inputs, 3 outputs, sigmoid, random weights}
75  Pds::FCLayer L0=Pds::FCLayer(2,3);
76  L0.PrintStylized("\nL0:\n");
77 
78  // Layer with {2 inputs, 3 outputs, tanh, random weights}
79  Pds::FCLayer L1=Pds::FCLayer(2,3,Pds::Tanh,Pds::DTanh);
80  L1.PrintStylized("\nL1:\n");
81 
82  Pds::Matrix W(3,5);
83  W.FillRandU(0,1); W.Print("W:\n");
84 
85  // Layer with {4 inputs, 3 outputs, sigmoid, W}
87  L2.PrintStylized("\nL2:\n");
88 
89  // Layer with {4 inputs, 3 outputs, tanh, W}
90  Pds::FCLayer L3=Pds::FCLayer(W,Pds::Tanh,Pds::DTanh);
91  L3.PrintStylized("\nL3:\n");
92 
93  // Unusable empty layer
94  Pds::FCLayer L5;
95  L5.PrintStylized("\nL5:\n");
96 
97  return 0;
98 }
La clase tipo Pds::FCLayer . Esta clase genera un objeto con dos parametros Nlin y Ncol....
Definition: FCLayer.hpp:61
const std::string FCLayer
Tag de un objeto de tipo Pds::FCLayer.
Definition: NnDefines.hpp:149
void PrintStylized(std::string str="") const
Muestra en pantalla el contenido de Pds::FCLayer, en el formato (Nli,Ncol).

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed