DeepLearning icon indicating copy to clipboard operation
DeepLearning copied to clipboard

A Problem with the Deep Belief Network C++ codes

Open aykutm opened this issue 8 years ago • 4 comments

I applied your dbn.cpp code . But for your all test data, the prediction results are equal. It is an unexpected situation (if we give a training sample as a train sample it can not find the true class, too). What is the problem? I expect your help.

aykutm avatar Feb 10 '16 13:02 aykutm

you need to change the mod from Debug to Release, then the answer is right

littlewei39 avatar May 31 '16 13:05 littlewei39

Why changing from Debug mode to Release makes it work?Could anyone explain that?

carterbao avatar Oct 11 '16 08:10 carterbao

I got it, in the HiddenLayer(int size, int in, int out, double **w, double *bp) construction function, after b = new double[n_out]; each element of b should be initialized to zero, otherwise they will be randomly initialized to be too large in debug mode. However in release mode, they are initialized to small values.

carterbao avatar Nov 30 '16 15:11 carterbao

@carterbao it works

auxs2015 avatar Feb 08 '17 10:02 auxs2015