From b6adf71a5192ddb00a441c2fb79656993cb8b12d Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Wed, 12 Jan 2022 08:52:48 +0000 Subject: [PATCH] - fixed Layer::calcContextBatch() learning current hidden state instead of learning previous hidden state git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@791 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- source/Layer.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Layer.hpp b/source/Layer.hpp index a3760c5..9fd043f 100644 --- a/source/Layer.hpp +++ b/source/Layer.hpp @@ -41,8 +41,8 @@ public: for (int i=1; i < numTraining; i++) { arma::mat h = toHiddenProbs(batch.row(i-1)); - arma::mat training_with_ctx = arma::join_rows(batch.row(i-1).cols(0, numVisible()-m_numContext-1), h); - batch.row(i-1) = training_with_ctx; + arma::mat training_with_ctx = arma::join_rows(batch.row(i).cols(0, numVisible()-m_numContext-1), h); + batch.row(i) = training_with_ctx; } } }