-
Notifications
You must be signed in to change notification settings - Fork 0
/
NeuralNetwork.h
29 lines (25 loc) · 1.05 KB
/
NeuralNetwork.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
#pragma once
#include "mathFunction.h"
#include "Activations.h"
#include "ErrorFunctions.h"
#include "Regularizations.h"
#include "Neuron.h"
#include "NeuralLink.h"
#include "NeuralLayer.h"
#include <vector>
#include <iostream>
using namespace std;
namespace nncpp {
class NeuralNetwork {
public:
vector<NeuralLayer> network;
NeuralNetwork(std::initializer_list<NeuralLayer> args);// maybe do poniters or a vector of refences tho very little memory loss
NeuralNetwork(vector<int> shape, mathFunction* activation, mathFunction* outputActivation, mathFunction* regularization, bool isSoftmax);// change the constructor to layer per layer type at some point
vector<double> forwardProp(vector<double> &inputs);
void backwardProp(double target, mathFunction* errorFunction);
void updateWeights(double learningRate, double regularizationNumber);
double getAverageError(vector<double> input, double target, mathFunction *errorFunction);
void doAnnealingStep(vector<vector<double> > &inputs, vector<int> &labels, int size, double T);
string toString();
};
}