- Layer: do gibbs sampling in calcContextBatch()

- RBM: added Gibbs sampler
- Stack adjust training column vector according to needs

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@797 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-13 07:19:47 +00:00
parent dba52a651d
commit be64a88e04
5 changed files with 48 additions and 13 deletions
+3 -1
View File
@@ -40,7 +40,9 @@ public:
{
for (int i=1; i < numTraining; i++)
{
arma::mat h = toHiddenProbs(batch.row(i-1));
arma::mat v = batch.row(i-1);
arma::mat h = arma::zeros(1, numHidden());
gibbs_vh(v, h);
arma::mat training_with_ctx = arma::join_rows(batch.row(i).cols(0, numVisible()-m_numContext-1), h);
batch.row(i) = training_with_ctx;
}