-
Notifications
You must be signed in to change notification settings - Fork 1
/
DBN.h
45 lines (35 loc) · 912 Bytes
/
DBN.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
#ifndef DBN_H
#define DBN_H
#include "RBM.h"
#include <iostream>
#include <ctime>
#include <cmath>
#include <vector>
#include <fstream>
#include <cstdlib>
#include <string>
#include "MLP_Network.h"
#include "MLP_Layer.h"
class DBN: public MLP_Network
{
private:
RBM* rbmNetwork;
float** input_DBN;
int nTrainingSet;
int nInputUnit;
int nHiddenUnit;
int nOutputUnit;
int nHiddenLayer;
int nMiniBatch;
public:
DBN(float** input,int nTrainingSet,int nInputUnit,int nHiddenUnit, int nHiddenLayer, int nMiniBatch, int num_output_size, float** desired_outputs);
~DBN();
void Allocate_DBN();
void Deallocate_DBN();
void Set_Input_In_Range();
int Sample_Binary_State_DBN(float probability);
void Pretrain(int cd_k,float lr_RBM, int DBN_EPOCH);
void Finetune();
void Print_Result(float** test,int nTestSet);
};
#endif