2015-03-23 18:28:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
2015-10-26 19:34:26 +00:00
|
|
|
#include <string>
|
2015-03-23 18:28:29 +00:00
|
|
|
|
2015-03-23 20:58:30 +00:00
|
|
|
#include "Layer.h"
|
2015-03-23 18:28:29 +00:00
|
|
|
|
|
|
|
class Net : public std::vector < Layer >
|
|
|
|
{
|
|
|
|
public:
|
2015-10-26 18:50:01 +00:00
|
|
|
Net();
|
2015-10-15 20:37:13 +00:00
|
|
|
Net(std::initializer_list<size_t> layerSizes);
|
2015-10-25 16:40:22 +00:00
|
|
|
Net(const std::string &filename);
|
2015-03-23 18:28:29 +00:00
|
|
|
|
2015-10-26 18:50:01 +00:00
|
|
|
void initialize(std::initializer_list<size_t> layerSizes);
|
|
|
|
|
2015-03-23 20:58:30 +00:00
|
|
|
void feedForward(const std::vector<double> &inputValues);
|
2015-10-27 14:33:10 +00:00
|
|
|
void feedForward(const double *inputValues);
|
2015-10-15 17:18:26 +00:00
|
|
|
std::vector<double> getOutput();
|
2015-03-23 20:58:30 +00:00
|
|
|
void backProp(const std::vector<double> &targetValues);
|
2015-10-25 16:40:22 +00:00
|
|
|
|
|
|
|
void save(const std::string &filename);
|
|
|
|
void load(const std::string &filename);
|
|
|
|
};
|