- show sample hidden button

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@847 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-19 20:30:59 +00:00
parent 46bfddeab3
commit 183ed3b89d
2 changed files with 11 additions and 11 deletions
+10 -10
View File
@@ -311,11 +311,11 @@ MainComponent::MainComponent (const String prjname)
m_rbmSelect->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
m_rbmSelect->addListener (this);
addAndMakeVisible (rbmDoSampleBatch = new ToggleButton ("rbmDoSampleBatch button"));
rbmDoSampleBatch->setTooltip (TRANS("Do stochastic sampling from training data"));
rbmDoSampleBatch->setTooltip (TRANS("Sample training data during learning\n"));
rbmDoSampleBatch->setButtonText (TRANS("Sample training"));
rbmDoSampleBatch->addListener (this);
addAndMakeVisible (rbmDoSampleHidden = new ToggleButton ("rbmDoSampleHidden button"));
rbmDoSampleHidden->setTooltip (TRANS("Do stochastic sampling from hidden state during gibbs sampling"));
rbmDoSampleHidden->setTooltip (TRANS("Sample hidden state during learning\n"));
rbmDoSampleHidden->setButtonText (TRANS("Sample hidden"));
rbmDoSampleHidden->addListener (this);
addAndMakeVisible (sizeMiniBatch = new Label ("sizeMiniBatch",
TRANS("100")));
@@ -385,7 +385,7 @@ MainComponent::~MainComponent()
rbmLearnVarianceButton = nullptr;
rbmNormalizeDataToggleButton = nullptr;
m_rbmSelect = nullptr;
rbmDoSampleBatch = nullptr;
rbmDoSampleHidden = nullptr;
sizeMiniBatch = nullptr;
rbmUseHiddenGaussianToggleButton = nullptr;
@@ -505,7 +505,7 @@ void MainComponent::resized()
weightInitLabel->setBounds (948, 200, 72, 24);
rbmLearnVarianceButton->setBounds (1004, 92, 128, 24);
rbmNormalizeDataToggleButton->setBounds (1004, 60, 124, 24);
rbmDoSampleBatch->setBounds (844, 60, 128, 24);
rbmDoSampleHidden->setBounds (844, 60, 128, 24);
sizeMiniBatch->setBounds (1064, 20, 48, 24);
rbmUseHiddenGaussianToggleButton->setBounds (840, 92, 156, 24);
//[UserResized] Add your own custom resize handling here..
@@ -661,10 +661,10 @@ void MainComponent::buttonClicked (Button* buttonThatWasClicked)
//[UserButtonCode_rbmNormalizeDataToggleButton] -- add your button handler code here..
//[/UserButtonCode_rbmNormalizeDataToggleButton]
}
else if (buttonThatWasClicked == rbmDoSampleBatch)
else if (buttonThatWasClicked == rbmDoSampleHidden)
{
//[UserButtonCode_rbmDoSampleBatch] -- add your button handler code here..
m_pLayer->params().doSampleBatch = buttonThatWasClicked->getToggleState();
m_pLayer->params().gibbsDoSampleHidden = buttonThatWasClicked->getToggleState();
//[/UserButtonCode_rbmDoSampleBatch]
}
else if (buttonThatWasClicked == rbmUseHiddenGaussianToggleButton)
@@ -933,7 +933,7 @@ void MainComponent::updateControls()
{
rbmDoRaoBlackwellToggleButton->setToggleState(m_pLayer->params().doRaoBlackwell, dontSendNotification);
rbmDoSampleVisibleToggleButton->setToggleState(m_pLayer->params().gibbsDoSampleVisible, dontSendNotification);
rbmDoSampleBatch->setToggleState(m_pLayer->params().doSampleBatch, dontSendNotification);
rbmDoSampleHidden->setToggleState(m_pLayer->params().doSampleBatch, dontSendNotification);
weightDecayLabel->setText(String(m_pLayer->params().weightDecay), dontSendNotification);
learningRateLabel->setText(String(m_pLayer->params().learningRate), dontSendNotification);