Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------
- // NETWORK.HPP
- //------------------------------------------------
- #ifndef NETWORK_HPP
- #define NETWORK_HPP
- // Libraries
- #include <vector>
- // My Libraries
- #include "neuron.hpp"
- #include "rne.hpp"
- #include "defs.hpp"
- // Typedefs and Structures
- // Network : Controls the dynamic of the neural network
- class network
- {
- private:
- std::vector<unsigned int> _network_structure;
- std::vector<std::vector<neuron>> _neurons;
- rne _random_engine;
- const double _learnrate, _layerfact;
- void _initialize_random_rates();
- void _reset_netoutputs();
- void _calculate_netoutputs(std::vector<double> input);
- void _train_network(std::vector<double> errors);
- public:
- network(std::vector<unsigned int> neurons_per_layer, rne &random_engine, double learning_rate = 0.1);
- double train_epoch(testcases tests); //testcases from defs.hpp
- std::vector<double> solve(std::vector<double> input);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement