-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfgen.h
63 lines (50 loc) · 1.67 KB
/
confgen.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <vector>
#include <iostream>
#include <string>
#include <sstream>
class ConfGen
{
public:
ConfGen();
//~ConfGen();
/*Init class*/
void setInputDimention(size_t indim) {in_cnt = indim;}
void setOutputDimention(size_t outdim) {out_cnt = outdim;}
void setFirstHiddenLayerRange(size_t lb, size_t tb);
void setOtherHiddenLayerRange(size_t lb, size_t tb);
void setHiddenLayersRange(size_t lb, size_t tb);
std::string textConf();
std::vector<size_t> get();
bool next();
bool prepare();
private:
// There are not changeable {
// Lower bound of items of first hidden layer
size_t firstHiddenLayerLB;
// Higher bound of items of first hidden layer
size_t firstHiddenLayerTB;
// Lower bound of hidden layers
size_t hiddenLayersLB;
// Higher bound of hidden layers
size_t hiddenLayersTB;
// Lower bound of items for hidden layers
size_t totalHiddenLayerLB;
// Higher bound of items for hidden layers
size_t totalHiddenLayerTB;
// {In,Out}put dimentions
size_t in_cnt;
size_t out_cnt;
// }
// Changeable properties
// For storing current first hidden layer
size_t currentFirstHL;
// For storing current hidden layers count
size_t currentHL;
// Current config
std::vector<size_t> currentConfig;
// Mid layers configurations
std::vector<size_t> midLayer;
bool prepared;
void reset();
friend std::ostream &operator<< (std::ostream &out, ConfGen &cfg);
};