- 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:
+10
-10
@@ -311,11 +311,11 @@ MainComponent::MainComponent (const String prjname)
|
|||||||
m_rbmSelect->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
|
m_rbmSelect->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
|
||||||
m_rbmSelect->addListener (this);
|
m_rbmSelect->addListener (this);
|
||||||
|
|
||||||
addAndMakeVisible (rbmDoSampleBatch = new ToggleButton ("rbmDoSampleBatch button"));
|
addAndMakeVisible (rbmDoSampleHidden = new ToggleButton ("rbmDoSampleHidden button"));
|
||||||
rbmDoSampleBatch->setTooltip (TRANS("Do stochastic sampling from training data"));
|
rbmDoSampleHidden->setTooltip (TRANS("Do stochastic sampling from hidden state during gibbs sampling"));
|
||||||
rbmDoSampleBatch->setTooltip (TRANS("Sample training data during learning\n"));
|
rbmDoSampleHidden->setTooltip (TRANS("Sample hidden state during learning\n"));
|
||||||
rbmDoSampleBatch->setButtonText (TRANS("Sample training"));
|
rbmDoSampleHidden->setButtonText (TRANS("Sample hidden"));
|
||||||
rbmDoSampleBatch->addListener (this);
|
rbmDoSampleHidden->addListener (this);
|
||||||
|
|
||||||
addAndMakeVisible (sizeMiniBatch = new Label ("sizeMiniBatch",
|
addAndMakeVisible (sizeMiniBatch = new Label ("sizeMiniBatch",
|
||||||
TRANS("100")));
|
TRANS("100")));
|
||||||
@@ -385,7 +385,7 @@ MainComponent::~MainComponent()
|
|||||||
rbmLearnVarianceButton = nullptr;
|
rbmLearnVarianceButton = nullptr;
|
||||||
rbmNormalizeDataToggleButton = nullptr;
|
rbmNormalizeDataToggleButton = nullptr;
|
||||||
m_rbmSelect = nullptr;
|
m_rbmSelect = nullptr;
|
||||||
rbmDoSampleBatch = nullptr;
|
rbmDoSampleHidden = nullptr;
|
||||||
sizeMiniBatch = nullptr;
|
sizeMiniBatch = nullptr;
|
||||||
rbmUseHiddenGaussianToggleButton = nullptr;
|
rbmUseHiddenGaussianToggleButton = nullptr;
|
||||||
|
|
||||||
@@ -505,7 +505,7 @@ void MainComponent::resized()
|
|||||||
weightInitLabel->setBounds (948, 200, 72, 24);
|
weightInitLabel->setBounds (948, 200, 72, 24);
|
||||||
rbmLearnVarianceButton->setBounds (1004, 92, 128, 24);
|
rbmLearnVarianceButton->setBounds (1004, 92, 128, 24);
|
||||||
rbmNormalizeDataToggleButton->setBounds (1004, 60, 124, 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);
|
sizeMiniBatch->setBounds (1064, 20, 48, 24);
|
||||||
rbmUseHiddenGaussianToggleButton->setBounds (840, 92, 156, 24);
|
rbmUseHiddenGaussianToggleButton->setBounds (840, 92, 156, 24);
|
||||||
//[UserResized] Add your own custom resize handling here..
|
//[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] -- add your button handler code here..
|
||||||
//[/UserButtonCode_rbmNormalizeDataToggleButton]
|
//[/UserButtonCode_rbmNormalizeDataToggleButton]
|
||||||
}
|
}
|
||||||
else if (buttonThatWasClicked == rbmDoSampleBatch)
|
else if (buttonThatWasClicked == rbmDoSampleHidden)
|
||||||
{
|
{
|
||||||
//[UserButtonCode_rbmDoSampleBatch] -- add your button handler code here..
|
//[UserButtonCode_rbmDoSampleBatch] -- add your button handler code here..
|
||||||
m_pLayer->params().doSampleBatch = buttonThatWasClicked->getToggleState();
|
m_pLayer->params().gibbsDoSampleHidden = buttonThatWasClicked->getToggleState();
|
||||||
//[/UserButtonCode_rbmDoSampleBatch]
|
//[/UserButtonCode_rbmDoSampleBatch]
|
||||||
}
|
}
|
||||||
else if (buttonThatWasClicked == rbmUseHiddenGaussianToggleButton)
|
else if (buttonThatWasClicked == rbmUseHiddenGaussianToggleButton)
|
||||||
@@ -933,7 +933,7 @@ void MainComponent::updateControls()
|
|||||||
{
|
{
|
||||||
rbmDoRaoBlackwellToggleButton->setToggleState(m_pLayer->params().doRaoBlackwell, dontSendNotification);
|
rbmDoRaoBlackwellToggleButton->setToggleState(m_pLayer->params().doRaoBlackwell, dontSendNotification);
|
||||||
rbmDoSampleVisibleToggleButton->setToggleState(m_pLayer->params().gibbsDoSampleVisible, 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);
|
weightDecayLabel->setText(String(m_pLayer->params().weightDecay), dontSendNotification);
|
||||||
learningRateLabel->setText(String(m_pLayer->params().learningRate), dontSendNotification);
|
learningRateLabel->setText(String(m_pLayer->params().learningRate), dontSendNotification);
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ private:
|
|||||||
ScopedPointer<ToggleButton> rbmLearnVarianceButton;
|
ScopedPointer<ToggleButton> rbmLearnVarianceButton;
|
||||||
ScopedPointer<ToggleButton> rbmNormalizeDataToggleButton;
|
ScopedPointer<ToggleButton> rbmNormalizeDataToggleButton;
|
||||||
ScopedPointer<ComboBox> m_rbmSelect;
|
ScopedPointer<ComboBox> m_rbmSelect;
|
||||||
ScopedPointer<ToggleButton> rbmDoSampleBatch;
|
ScopedPointer<ToggleButton> rbmDoSampleHidden;
|
||||||
ScopedPointer<Label> sizeMiniBatch;
|
ScopedPointer<Label> sizeMiniBatch;
|
||||||
ScopedPointer<ToggleButton> rbmUseHiddenGaussianToggleButton;
|
ScopedPointer<ToggleButton> rbmUseHiddenGaussianToggleButton;
|
||||||
std::string m_dir;
|
std::string m_dir;
|
||||||
|
|||||||
Reference in New Issue
Block a user