NNetCpp
Neural network implementation in C++
 All Classes Namespaces Functions Variables
ConnectedNet.h
1 #ifndef CONNECTED_NET_H
2 #define CONNECTED_NET_H
3 
4 #include <vector>
5 
6 #include "InputNode.h"
7 #include "Neuron.h"
8 #include "WeightGenerator.h"
9 #include "OutputNeuron.h"
10 #include "TrainingData.h"
11 
16  private:
17  std::vector<InputNode*> inputs;
18  std::vector<std::vector<Neuron*> > hidden;
19  std::vector<OutputNeuron*> outputs;
20  InputNode* bias = nullptr;
21 
22  std::vector<std::vector<Edge*> > edges;
23 
24  public:
40  ConnectedNet(int inputNodes, std::vector<int> hiddenLayers,
41  int outputNodes, WeightGenerator* weightGen = nullptr);
42 
46  ~ConnectedNet();
47 
55  std::vector<double> getOutput(std::vector<double> inputValues);
56 
64  void train(TrainingData& tData, double learningRate);
65 
71  std::vector<double> getDifference();
72 };
73 
74 #endif // CONNECTED_NET_H
std::vector< double > getDifference()
Definition: ConnectedNet.cpp:274
Definition: InputNode.h:9
Definition: TrainingData.h:10
ConnectedNet(int inputNodes, std::vector< int > hiddenLayers, int outputNodes, WeightGenerator *weightGen=nullptr)
Definition: ConnectedNet.cpp:5
void train(TrainingData &tData, double learningRate)
Definition: ConnectedNet.cpp:243
~ConnectedNet()
Definition: ConnectedNet.cpp:189
Definition: WeightGenerator.h:7
std::vector< double > getOutput(std::vector< double > inputValues)
Definition: ConnectedNet.cpp:216
Definition: ConnectedNet.h:15