From b1fcf14e9919b6eb9d3b47568e0f378db0c42319 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Thu, 23 Jun 2016 06:45:57 +0000 Subject: [PATCH] [RBM] - sample h before negative phase git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@301 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- Source/Rbm.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Rbm.hpp b/Source/Rbm.hpp index 6077548..50e3de2 100644 --- a/Source/Rbm.hpp +++ b/Source/Rbm.hpp @@ -304,6 +304,8 @@ public: for (gibbs=0; gibbs < m_params.m_numGibbs; gibbs++) { + sample(h); + // Create visible reconstruction (a fantasy...) given h toVisibleBatch(m_v, h); if (m_params.m_useVisibleGaussian) @@ -326,10 +328,6 @@ public: toHiddenBatch(h, m_v); } } - if (!m_params.m_doRaoBlackwell) - { - sample(h); - } } // Update weights (negative phase)