- no need to free RBM instance when weight topology changes

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@35 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-10-24 06:10:54 +00:00
parent ba04927592
commit 6a0ef8d8f7
+1 -2
View File
@@ -287,6 +287,7 @@ MainComponent::MainComponent ()
m_hNum = 64; m_hNum = 64;
m_numGibbs = 1; m_numGibbs = 1;
m_weights.setUnits(m_vNumX*m_vNumY, m_hNum); m_weights.setUnits(m_vNumX*m_vNumY, m_hNum);
m_pRbm = new Rbm(m_weights, this);
create(); create();
//[/UserPreSize] //[/UserPreSize]
@@ -776,7 +777,6 @@ void MainComponent::create()
DrawReconstruction = nullptr; DrawReconstruction = nullptr;
DrawWeights = nullptr; DrawWeights = nullptr;
DrawHidden = nullptr; DrawHidden = nullptr;
m_pRbm = nullptr;
WeightsSlider->setRange(0, m_hNum-1, 1); WeightsSlider->setRange(0, m_hNum-1, 1);
@@ -790,7 +790,6 @@ void MainComponent::create()
numVisibleYLabel->setText(String(m_vNumY), dontSendNotification ); numVisibleYLabel->setText(String(m_vNumY), dontSendNotification );
numHiddenLabel->setText(String(m_hNum), dontSendNotification ); numHiddenLabel->setText(String(m_hNum), dontSendNotification );
m_pRbm = new Rbm(m_weights, this);
sigma_gauss = 0.5; sigma_gauss = 0.5;
sigmaDecay_gauss = 1.0; sigmaDecay_gauss = 1.0;
m_pRbm->setDoRaoBlackwell(rbmDoRaoBlackwellToggleButton->getToggleState()); m_pRbm->setDoRaoBlackwell(rbmDoRaoBlackwellToggleButton->getToggleState());