-
Notifications
You must be signed in to change notification settings - Fork 0
/
net.h
29 lines (25 loc) · 816 Bytes
/
net.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef NET_H
#define NET_H
#include <vector>
#include <QString>
#include "neuron.h"
//typedef std::vector<Neuron> Layer;
class net
{
public:
net(const std::vector<unsigned> _topology,std::vector<std::vector<std::vector<std::pair<double,double>>>> *loaded_data=nullptr);
void feedForward(const std::vector<double> &inputVals);
void backProp(const std::vector<double> &Target);
void getResults(std::vector<double> &Result);
void saveWeightTemplate(QString filename);
static net* loadWeightTemplate(QString filename);
void clear();
private:
double error;
//std::vector<double> inputVals;
//std::vector<unsigned> topology;
std::vector<std::vector<Neuron *>> neurons;
double smoothing;
double recentaverageerror;
};
#endif // NET_H