NNetCpp
Neural network implementation in C++
 All Classes Namespaces Functions Variables
NetTraining.h
1 #ifndef NET_TRAINING_H
2 #define NET_TRAINING_H
3 
4 #include <vector>
5 
6 #include "ConnectedNet.h"
7 #include "StopCondition.h"
8 
14  private:
15  ConnectedNet* net = nullptr;
16  std::vector<TrainingData> trainingData;
17  std::vector<TrainingData> evalData;
18  StopCondition* stopper = nullptr;
19  double learningRate = 1.0;
20  int trainingPerIteration = 1;
21 
22  double error = 0;
23  int iteration = 0;
24 
28  void printInfo();
29 
36  static void printInOut(const std::vector<double>& input,
37  const std::vector<double>& output);
38 
39  public:
52  NetTraining(ConnectedNet* net, std::vector<TrainingData> trainingData,
53  std::vector<TrainingData> evalData, StopCondition* stopper,
54  double learningRate, int trainingPerIteration = 1);
55 
59  void run();
60 };
61 
62 #endif // NET_TRAINING_H
Definition: NetTraining.h:13
Definition: ConnectedNet.h:15
NetTraining(ConnectedNet *net, std::vector< TrainingData > trainingData, std::vector< TrainingData > evalData, StopCondition *stopper, double learningRate, int trainingPerIteration=1)
Definition: NetTraining.cpp:6
Definition: StopCondition.h:10
void run()
Definition: NetTraining.cpp:45