DeepLearning
DeepLearning copied to clipboard
bug in DBN.cpp
DBN::DBN(int size, int n_i, int *hls, int n_o, int n_l) {
// construct rbm_layer
// DBN-RBM deconstructer bug fixed
rbm_layers[i] = new RBM(N, input_size, hidden_layer_sizes[i],
NULL, NULL, NULL);
//rbm_layers[i] = new RBM(N, input_size, hidden_layer_sizes[i],
// sigmoid_layers[i]->W, sigmoid_layers[i]->b, NULL);
}
}
sigmoid_layers[i]->W, sigmoid_layers[i]->b should be set NULL in DBN constructer if not, RBM's W member will be sigmoid_layers[i]->W when RBM deconstruction, there will have issue.