Files
Rbm-legacy/Source/MainComponent.cpp
T
jens 1705287e37 [RBM]
- DBN fixes
- batch sample inside training loop
- implemented RbmComponent stacking

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@296 b431acfa-c32f-4a4a-93f1-934dc6c82436
2016-06-18 17:57:32 +00:00

1112 lines
52 KiB
C++

/*
==============================================================================
This is an automatically generated GUI class created by the Introjucer!
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Introjucer version: 3.1.0
------------------------------------------------------------------------------
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
Copyright 2004-13 by Raw Material Software Ltd.
==============================================================================
*/
//[Headers] You can add your own extra header files here...
//[/Headers]
#include "MainComponent.h"
//[MiscUserDefs] You can add your own user definitions and misc code here...
void mylog(const char* format, ...)
{
char log_buf[257];
va_list argptr;
va_start(argptr, format);
vprintf(format, argptr);
va_end(argptr);
}
//[/MiscUserDefs]
//==============================================================================
MainComponent::MainComponent ()
: Thread("RBM"),
m_pRbmComponentCurr(nullptr),
m_weightsCurr(nullptr),
m_layers(this)
{
addAndMakeVisible (trainButton = new TextButton ("Train button"));
trainButton->setButtonText (TRANS("Train"));
trainButton->addListener (this);
addAndMakeVisible (addButton = new TextButton ("Add button"));
addButton->setButtonText (TRANS("Add"));
addButton->addListener (this);
addAndMakeVisible (patterSlider = new Slider ("Pattern slider"));
patterSlider->setRange (0, 0, 1);
patterSlider->setSliderStyle (Slider::LinearBar);
patterSlider->setTextBoxStyle (Slider::TextBoxLeft, false, 80, 20);
patterSlider->addListener (this);
addAndMakeVisible (reconstructButton = new TextButton ("Reconstruct button"));
reconstructButton->setButtonText (TRANS("Reconstruct"));
reconstructButton->addListener (this);
addAndMakeVisible (ShakeButton = new TextButton ("Shake button"));
ShakeButton->setButtonText (TRANS("Shake"));
ShakeButton->addListener (this);
addAndMakeVisible (WeightsSlider = new Slider ("Weights slider"));
WeightsSlider->setRange (0, 0, 1);
WeightsSlider->setSliderStyle (Slider::LinearBar);
WeightsSlider->setTextBoxStyle (Slider::TextBoxLeft, false, 80, 20);
WeightsSlider->addListener (this);
addAndMakeVisible (numEpochslabel = new Label ("Num Epochs label",
TRANS("1000")));
numEpochslabel->setFont (Font (15.00f, Font::plain));
numEpochslabel->setJustificationType (Justification::centred);
numEpochslabel->setEditable (true, true, false);
numEpochslabel->setColour (TextEditor::textColourId, Colours::black);
numEpochslabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
numEpochslabel->addListener (this);
addAndMakeVisible (learningRateLabel = new Label ("Learning Rate label",
TRANS("0.01")));
learningRateLabel->setFont (Font (15.00f, Font::plain));
learningRateLabel->setJustificationType (Justification::centred);
learningRateLabel->setEditable (true, true, false);
learningRateLabel->setColour (TextEditor::textColourId, Colours::black);
learningRateLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
learningRateLabel->addListener (this);
addAndMakeVisible (testButton = new TextButton ("Test button"));
testButton->setButtonText (TRANS("Test"));
testButton->addListener (this);
addAndMakeVisible (numVisibleLabel = new Label ("Num Visible label",
TRANS("16")));
numVisibleLabel->setFont (Font (15.00f, Font::plain));
numVisibleLabel->setJustificationType (Justification::centred);
numVisibleLabel->setEditable (true, true, false);
numVisibleLabel->setColour (TextEditor::textColourId, Colours::black);
numVisibleLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
numVisibleLabel->addListener (this);
addAndMakeVisible (numHiddenLabel = new Label ("Num Hidden label",
TRANS("64")));
numHiddenLabel->setFont (Font (15.00f, Font::plain));
numHiddenLabel->setJustificationType (Justification::centred);
numHiddenLabel->setEditable (true, true, false);
numHiddenLabel->setColour (TextEditor::textColourId, Colours::black);
numHiddenLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
numHiddenLabel->addListener (this);
addAndMakeVisible (createButton = new TextButton ("Create button"));
createButton->setButtonText (TRANS("Create"));
createButton->addListener (this);
addAndMakeVisible (projectNameLabel = new Label ("Project Name label",
TRANS("test")));
projectNameLabel->setFont (Font (15.00f, Font::plain));
projectNameLabel->setJustificationType (Justification::centred);
projectNameLabel->setEditable (true, true, false);
projectNameLabel->setColour (TextEditor::textColourId, Colours::black);
projectNameLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
projectNameLabel->addListener (this);
addAndMakeVisible (loadButton = new TextButton ("Load button"));
loadButton->setButtonText (TRANS("Load"));
loadButton->addListener (this);
addAndMakeVisible (saveButton = new TextButton ("Save button"));
saveButton->setButtonText (TRANS("Save"));
saveButton->addListener (this);
addAndMakeVisible (numVisibleYLabel = new Label ("Num Visible Y label",
TRANS("16")));
numVisibleYLabel->setFont (Font (15.00f, Font::plain));
numVisibleYLabel->setJustificationType (Justification::centred);
numVisibleYLabel->setEditable (true, true, false);
numVisibleYLabel->setColour (TextEditor::textColourId, Colours::black);
numVisibleYLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
numVisibleYLabel->addListener (this);
addAndMakeVisible (loadTrainingButton = new TextButton ("Load Training button"));
loadTrainingButton->setButtonText (TRANS("Load T"));
loadTrainingButton->addListener (this);
addAndMakeVisible (saveTrainingButton = new TextButton ("Save Training button"));
saveTrainingButton->setButtonText (TRANS("Save T"));
saveTrainingButton->addListener (this);
addAndMakeVisible (clearTrainingButton = new TextButton ("Clear Training button"));
clearTrainingButton->setButtonText (TRANS("Clear T"));
clearTrainingButton->addListener (this);
addAndMakeVisible (removeTrainingButton = new TextButton ("Remove Training button"));
removeTrainingButton->setButtonText (TRANS("Remove T"));
removeTrainingButton->addListener (this);
addAndMakeVisible (numGibbsSlider = new Slider ("Num. Gibbs slider"));
numGibbsSlider->setRange (1, 101, 1);
numGibbsSlider->setSliderStyle (Slider::LinearBar);
numGibbsSlider->setTextBoxStyle (Slider::TextBoxLeft, false, 80, 20);
numGibbsSlider->addListener (this);
addAndMakeVisible (reconstructEquButton = new TextButton ("Reconstruct Equilibrium button"));
reconstructEquButton->setButtonText (TRANS("Reconst Equ."));
reconstructEquButton->addListener (this);
addAndMakeVisible (rbmDoRaoBlackwellToggleButton = new ToggleButton ("rbmDoRaoBlackwell toggle button"));
rbmDoRaoBlackwellToggleButton->setButtonText (TRANS("Rao-Blackwell"));
rbmDoRaoBlackwellToggleButton->addListener (this);
addAndMakeVisible (rbmReduceVarianceToggleButton = new ToggleButton ("rbmReduceVariance toggle button"));
rbmReduceVarianceToggleButton->setButtonText (TRANS("Reduce Variance"));
rbmReduceVarianceToggleButton->addListener (this);
addAndMakeVisible (lambdaLabel = new Label ("Lambda label",
TRANS("1.0")));
lambdaLabel->setFont (Font (15.00f, Font::plain));
lambdaLabel->setJustificationType (Justification::centred);
lambdaLabel->setEditable (true, true, false);
lambdaLabel->setColour (TextEditor::textColourId, Colours::black);
lambdaLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
lambdaLabel->addListener (this);
addAndMakeVisible (sigmaLabel = new Label ("Sigma label",
TRANS("1.0")));
sigmaLabel->setFont (Font (15.00f, Font::plain));
sigmaLabel->setJustificationType (Justification::centred);
sigmaLabel->setEditable (true, true, false);
sigmaLabel->setColour (TextEditor::textColourId, Colours::black);
sigmaLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
sigmaLabel->addListener (this);
addAndMakeVisible (rbmUseVisibleGaussianToggleButton = new ToggleButton ("rbmUseVisibleGaussian toggle button"));
rbmUseVisibleGaussianToggleButton->setButtonText (TRANS("Use gaussian visible"));
rbmUseVisibleGaussianToggleButton->addListener (this);
addAndMakeVisible (rbmDoSparseToggleButton = new ToggleButton ("rbmDoSparse toggle button"));
rbmDoSparseToggleButton->setButtonText (TRANS("Do sparse"));
rbmDoSparseToggleButton->addListener (this);
addAndMakeVisible (sparsityLabel = new Label ("Sparsity label",
TRANS("0.05")));
sparsityLabel->setFont (Font (15.00f, Font::plain));
sparsityLabel->setJustificationType (Justification::centred);
sparsityLabel->setEditable (true, true, false);
sparsityLabel->setColour (TextEditor::textColourId, Colours::black);
sparsityLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
sparsityLabel->addListener (this);
addAndMakeVisible (sigmaDecayLabel = new Label ("SigmaDecay label",
TRANS("1.0")));
sigmaDecayLabel->setFont (Font (15.00f, Font::plain));
sigmaDecayLabel->setJustificationType (Justification::centred);
sigmaDecayLabel->setEditable (true, true, false);
sigmaDecayLabel->setColour (TextEditor::textColourId, Colours::black);
sigmaDecayLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
sigmaDecayLabel->addListener (this);
addAndMakeVisible (weightDecayLabel = new Label ("WeightDecay label",
TRANS("0.0")));
weightDecayLabel->setFont (Font (15.00f, Font::plain));
weightDecayLabel->setJustificationType (Justification::centred);
weightDecayLabel->setEditable (true, true, false);
weightDecayLabel->setColour (TextEditor::textColourId, Colours::black);
weightDecayLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
weightDecayLabel->addListener (this);
addAndMakeVisible (m_progressBarSlider = new Slider ("progressBar slider"));
m_progressBarSlider->setRange (0, 100, 1);
m_progressBarSlider->setSliderStyle (Slider::LinearBar);
m_progressBarSlider->setTextBoxStyle (Slider::TextBoxLeft, true, 80, 20);
m_progressBarSlider->addListener (this);
addAndMakeVisible (momentumLabel = new Label ("Momentum label",
TRANS("0.5")));
momentumLabel->setFont (Font (15.00f, Font::plain));
momentumLabel->setJustificationType (Justification::centred);
momentumLabel->setEditable (true, true, false);
momentumLabel->setColour (TextEditor::textColourId, Colours::black);
momentumLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
momentumLabel->addListener (this);
addAndMakeVisible (sparsityLearningRateLabel = new Label ("SparsityLearn label",
TRANS("0.01")));
sparsityLearningRateLabel->setFont (Font (15.00f, Font::plain));
sparsityLearningRateLabel->setJustificationType (Justification::centred);
sparsityLearningRateLabel->setEditable (true, true, false);
sparsityLearningRateLabel->setColour (TextEditor::textColourId, Colours::black);
sparsityLearningRateLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
sparsityLearningRateLabel->addListener (this);
addAndMakeVisible (weightInitLabel = new Label ("WeightInit label",
TRANS("0.001")));
weightInitLabel->setFont (Font (15.00f, Font::plain));
weightInitLabel->setJustificationType (Justification::centred);
weightInitLabel->setEditable (true, true, false);
weightInitLabel->setColour (TextEditor::textColourId, Colours::black);
weightInitLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
weightInitLabel->addListener (this);
addAndMakeVisible (rbmLearnVarianceButton = new ToggleButton ("rbmLearnVariance button"));
rbmLearnVarianceButton->setButtonText (TRANS("Learn Variance"));
rbmLearnVarianceButton->addListener (this);
addAndMakeVisible (rbmNormalizeDataToggleButton = new ToggleButton ("rbmNormalizeData toggle button"));
rbmNormalizeDataToggleButton->setButtonText (TRANS("Normalize data"));
rbmNormalizeDataToggleButton->addListener (this);
addAndMakeVisible (m_rbmSelect = new ComboBox ("RBM Selector"));
m_rbmSelect->setEditableText (false);
m_rbmSelect->setJustificationType (Justification::centredLeft);
m_rbmSelect->setTextWhenNothingSelected (String::empty);
m_rbmSelect->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
m_rbmSelect->addListener (this);
//[UserPreSize]
memset(m_pRbmComponent, 0, sizeof(m_pRbmComponent));
memset(m_weights, 0, sizeof(m_weights));
m_rbmSelect->addItem(String(0), 1);
m_rbmSelect->setSelectedId(1, dontSendNotification);
m_progressBarSlider->setValue(100);
//[/UserPreSize]
setSize (1000, 600);
//[Constructor] You can add your own custom stuff here..
//[/Constructor]
}
MainComponent::~MainComponent()
{
//[Destructor_pre]. You can add your own custom destruction code here..
//[/Destructor_pre]
trainButton = nullptr;
addButton = nullptr;
patterSlider = nullptr;
reconstructButton = nullptr;
ShakeButton = nullptr;
WeightsSlider = nullptr;
numEpochslabel = nullptr;
learningRateLabel = nullptr;
testButton = nullptr;
numVisibleLabel = nullptr;
numHiddenLabel = nullptr;
createButton = nullptr;
projectNameLabel = nullptr;
loadButton = nullptr;
saveButton = nullptr;
numVisibleYLabel = nullptr;
loadTrainingButton = nullptr;
saveTrainingButton = nullptr;
clearTrainingButton = nullptr;
removeTrainingButton = nullptr;
numGibbsSlider = nullptr;
reconstructEquButton = nullptr;
rbmDoRaoBlackwellToggleButton = nullptr;
rbmReduceVarianceToggleButton = nullptr;
lambdaLabel = nullptr;
sigmaLabel = nullptr;
rbmUseVisibleGaussianToggleButton = nullptr;
rbmDoSparseToggleButton = nullptr;
sparsityLabel = nullptr;
sigmaDecayLabel = nullptr;
weightDecayLabel = nullptr;
m_progressBarSlider = nullptr;
momentumLabel = nullptr;
sparsityLearningRateLabel = nullptr;
weightInitLabel = nullptr;
rbmLearnVarianceButton = nullptr;
rbmNormalizeDataToggleButton = nullptr;
m_rbmSelect = nullptr;
//[Destructor]. You can add your own custom destruction code here..
//[/Destructor]
}
//==============================================================================
void MainComponent::paint (Graphics& g)
{
//[UserPrePaint] Add your own custom painting code here..
//[/UserPrePaint]
g.fillAll (Colours::white);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Sigma"),
500, 138, 80, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Lambda"),
588, 138, 80, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Num. epochs"),
491, 186, 91, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Alpha"),
588, 186, 80, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Sparsity"),
676, 138, 80, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Sigma decay"),
764, 138, 96, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Weight decay"),
764, 186, 96, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Momentum"),
676, 186, 80, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Sparsity Alpha"),
876, 138, 96, 14,
Justification::centred, true);
g.setColour (Colours::black);
g.setFont (Font (15.00f, Font::plain));
g.drawText (TRANS("Weight init"),
876, 186, 96, 14,
Justification::centred, true);
//[UserPaint] Add your own custom painting code here..
//[/UserPaint]
}
void MainComponent::resized()
{
trainButton->setBounds (592, 240, 72, 24);
addButton->setBounds (496, 20, 72, 24);
patterSlider->setBounds (696, 280, 184, 24);
reconstructButton->setBounds (496, 240, 72, 24);
ShakeButton->setBounds (592, 280, 72, 24);
WeightsSlider->setBounds (696, 320, 184, 24);
numEpochslabel->setBounds (504, 200, 72, 24);
learningRateLabel->setBounds (592, 200, 72, 24);
testButton->setBounds (592, 20, 72, 24);
numVisibleLabel->setBounds (736, 368, 48, 24);
numHiddenLabel->setBounds (840, 368, 48, 24);
createButton->setBounds (660, 368, 72, 24);
projectNameLabel->setBounds (892, 368, 96, 24);
loadButton->setBounds (496, 368, 72, 24);
saveButton->setBounds (576, 368, 72, 24);
numVisibleYLabel->setBounds (788, 368, 48, 24);
loadTrainingButton->setBounds (496, 404, 72, 24);
saveTrainingButton->setBounds (576, 404, 72, 24);
clearTrainingButton->setBounds (736, 404, 72, 24);
removeTrainingButton->setBounds (656, 404, 72, 24);
numGibbsSlider->setBounds (696, 240, 184, 24);
reconstructEquButton->setBounds (496, 280, 72, 24);
rbmDoRaoBlackwellToggleButton->setBounds (496, 60, 112, 24);
rbmReduceVarianceToggleButton->setBounds (640, 60, 128, 24);
lambdaLabel->setBounds (592, 152, 72, 24);
sigmaLabel->setBounds (504, 152, 72, 24);
rbmUseVisibleGaussianToggleButton->setBounds (640, 92, 160, 24);
rbmDoSparseToggleButton->setBounds (496, 92, 128, 24);
sparsityLabel->setBounds (680, 152, 72, 24);
sigmaDecayLabel->setBounds (776, 152, 72, 24);
weightDecayLabel->setBounds (776, 200, 72, 24);
m_progressBarSlider->setBounds (688, 20, 184, 24);
momentumLabel->setBounds (680, 200, 72, 24);
sparsityLearningRateLabel->setBounds (888, 152, 72, 24);
weightInitLabel->setBounds (888, 200, 72, 24);
rbmLearnVarianceButton->setBounds (808, 60, 128, 24);
rbmNormalizeDataToggleButton->setBounds (808, 92, 160, 24);
m_rbmSelect->setBounds (844, 404, 62, 24);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
void MainComponent::buttonClicked (Button* buttonThatWasClicked)
{
//[UserbuttonClicked_Pre]
//[/UserbuttonClicked_Pre]
if (buttonThatWasClicked == trainButton)
{
//[UserButtonCode_trainButton] -- add your button handler code here..
startThread();
//[/UserButtonCode_trainButton]
}
else if (buttonThatWasClicked == addButton)
{
//[UserButtonCode_addButton] -- add your button handler code here..
m_layers.add(m_pRbmComponent[0]->getTrainingData(), m_weights[0]->getNumVisible());
m_pRbmComponent[0]->batchchanged();
//[/UserButtonCode_addButton]
}
else if (buttonThatWasClicked == reconstructButton)
{
//[UserButtonCode_reconstructButton] -- add your button handler code here..
m_pRbmComponentCurr->redrawReconstruction();
//[/UserButtonCode_reconstructButton]
}
else if (buttonThatWasClicked == ShakeButton)
{
//[UserButtonCode_ShakeButton] -- add your button handler code here..
m_weightsCurr->shuffle(weightInitLabel->getText().getFloatValue());
m_pRbmComponentCurr->batchchanged();
m_pRbmComponentCurr->redrawWeights();
m_pRbmComponentCurr->redrawReconstruction();
//[/UserButtonCode_ShakeButton]
}
else if (buttonThatWasClicked == testButton)
{
//[UserButtonCode_testButton] -- add your button handler code here..
m_pRbmComponentCurr->copyReconstructionToTraining();
m_pRbmComponentCurr->redrawReconstruction();
//[/UserButtonCode_testButton]
}
else if (buttonThatWasClicked == createButton)
{
//[UserButtonCode_createButton] -- add your button handler code here..
create();
//[/UserButtonCode_createButton]
}
else if (buttonThatWasClicked == loadButton)
{
//[UserButtonCode_loadButton] -- add your button handler code here..
m_rbmSelect->setSelectedId(1, sendNotification);
create(getBaseDir());
//[/UserButtonCode_loadButton]
}
else if (buttonThatWasClicked == saveButton)
{
//[UserButtonCode_saveButton] -- add your button handler code here..
save();
//[/UserButtonCode_saveButton]
}
else if (buttonThatWasClicked == loadTrainingButton)
{
//[UserButtonCode_loadTrainingButton] -- add your button handler code here..
loadTraining((String(getBaseDir() + String(".trainingStates.dat"))).toUTF8());
m_pRbmComponent[0]->batchchanged();
//[/UserButtonCode_loadTrainingButton]
}
else if (buttonThatWasClicked == saveTrainingButton)
{
//[UserButtonCode_saveTrainingButton] -- add your button handler code here..
saveTraining((String(getBaseDir() + String(".trainingStates.dat"))).toUTF8());
//[/UserButtonCode_saveTrainingButton]
}
else if (buttonThatWasClicked == clearTrainingButton)
{
//[UserButtonCode_clearTrainingButton] -- add your button handler code here..
clearTraining();
m_pRbmComponent[0]->batchchanged();
//[/UserButtonCode_clearTrainingButton]
}
else if (buttonThatWasClicked == removeTrainingButton)
{
//[UserButtonCode_removeTrainingButton] -- add your button handler code here..
removeTrainingAt((int)patterSlider->getValue());
m_pRbmComponent[0]->batchchanged();
//[/UserButtonCode_removeTrainingButton]
}
else if (buttonThatWasClicked == reconstructEquButton)
{
//[UserButtonCode_reconstructEquButton] -- add your button handler code here..
m_pRbmComponentCurr->redrawReconstruction();
//[/UserButtonCode_reconstructEquButton]
}
else if (buttonThatWasClicked == rbmDoRaoBlackwellToggleButton)
{
//[UserButtonCode_rbmDoRaoBlackwellToggleButton] -- add your button handler code here..
m_pRbmComponentCurr->setDoRaoBlackwell(buttonThatWasClicked->getToggleState());
//[/UserButtonCode_rbmDoRaoBlackwellToggleButton]
}
else if (buttonThatWasClicked == rbmReduceVarianceToggleButton)
{
//[UserButtonCode_rbmReduceVarianceToggleButton] -- add your button handler code here..
m_pRbmComponentCurr->setUseProbsForHiddenReconstruction(buttonThatWasClicked->getToggleState());
//[/UserButtonCode_rbmReduceVarianceToggleButton]
}
else if (buttonThatWasClicked == rbmUseVisibleGaussianToggleButton)
{
//[UserButtonCode_rbmUseVisibleGaussianToggleButton] -- add your button handler code here..
m_pRbmComponentCurr->setUseVisibleGaussian(buttonThatWasClicked->getToggleState());
m_pRbmComponentCurr->redrawReconstruction();
//[/UserButtonCode_rbmUseVisibleGaussianToggleButton]
}
else if (buttonThatWasClicked == rbmDoSparseToggleButton)
{
//[UserButtonCode_rbmDoSparseToggleButton] -- add your button handler code here..
m_pRbmComponentCurr->setDoSparse(buttonThatWasClicked->getToggleState());
//[/UserButtonCode_rbmDoSparseToggleButton]
}
else if (buttonThatWasClicked == rbmLearnVarianceButton)
{
//[UserButtonCode_rbmLearnVarianceButton] -- add your button handler code here..
m_pRbmComponentCurr->setDoLearnVariance(buttonThatWasClicked->getToggleState());
if (!buttonThatWasClicked->getToggleState())
{
m_pRbmComponentCurr->setSigma(sigmaLabel->getText().getFloatValue());
}
//[/UserButtonCode_rbmLearnVarianceButton]
}
else if (buttonThatWasClicked == rbmNormalizeDataToggleButton)
{
//[UserButtonCode_rbmNormalizeDataToggleButton] -- add your button handler code here..
m_pRbmComponentCurr->setNormalizeData(buttonThatWasClicked->getToggleState());
//[/UserButtonCode_rbmNormalizeDataToggleButton]
}
//[UserbuttonClicked_Post]
//[/UserbuttonClicked_Post]
}
void MainComponent::sliderValueChanged (Slider* sliderThatWasMoved)
{
//[UsersliderValueChanged_Pre]
//[/UsersliderValueChanged_Pre]
if (sliderThatWasMoved == patterSlider)
{
//[UserSliderCode_patterSlider] -- add your slider handling code here..
m_pRbmComponentCurr->setTrainingIndex((int)sliderThatWasMoved->getValue());
//[/UserSliderCode_patterSlider]
}
else if (sliderThatWasMoved == WeightsSlider)
{
//[UserSliderCode_WeightsSlider] -- add your slider handling code here..
m_pRbmComponentCurr->setWeightsIndex((int)sliderThatWasMoved->getValue());
//[/UserSliderCode_WeightsSlider]
}
else if (sliderThatWasMoved == numGibbsSlider)
{
//[UserSliderCode_numGibbsSlider] -- add your slider handling code here..
m_pRbmComponentCurr->setNumGibbs((uint32_t)sliderThatWasMoved->getValue());
//[/UserSliderCode_numGibbsSlider]
}
else if (sliderThatWasMoved == m_progressBarSlider)
{
//[UserSliderCode_m_progressBarSlider] -- add your slider handling code here..
//[/UserSliderCode_m_progressBarSlider]
}
//[UsersliderValueChanged_Post]
//[/UsersliderValueChanged_Post]
}
void MainComponent::labelTextChanged (Label* labelThatHasChanged)
{
//[UserlabelTextChanged_Pre]
//[/UserlabelTextChanged_Pre]
if (labelThatHasChanged == numEpochslabel)
{
//[UserLabelCode_numEpochslabel] -- add your label text handling code here..
//[/UserLabelCode_numEpochslabel]
}
else if (labelThatHasChanged == learningRateLabel)
{
//[UserLabelCode_learningRateLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setMuWeights(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_learningRateLabel]
}
else if (labelThatHasChanged == numVisibleLabel)
{
//[UserLabelCode_numVisibleLabel] -- add your label text handling code here..
//[/UserLabelCode_numVisibleLabel]
}
else if (labelThatHasChanged == numHiddenLabel)
{
//[UserLabelCode_numHiddenLabel] -- add your label text handling code here..
//[/UserLabelCode_numHiddenLabel]
}
else if (labelThatHasChanged == projectNameLabel)
{
//[UserLabelCode_projectNameLabel] -- add your label text handling code here..
//[/UserLabelCode_projectNameLabel]
}
else if (labelThatHasChanged == numVisibleYLabel)
{
//[UserLabelCode_numVisibleYLabel] -- add your label text handling code here..
//[/UserLabelCode_numVisibleYLabel]
}
else if (labelThatHasChanged == lambdaLabel)
{
//[UserLabelCode_lambdaLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setLambda(labelThatHasChanged->getText().getFloatValue());
m_pRbmComponentCurr->redrawReconstruction();
//[/UserLabelCode_lambdaLabel]
}
else if (labelThatHasChanged == sigmaLabel)
{
//[UserLabelCode_sigmaLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setSigma(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_sigmaLabel]
}
else if (labelThatHasChanged == sparsityLabel)
{
//[UserLabelCode_sparsityLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setSparsity(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_sparsityLabel]
}
else if (labelThatHasChanged == sigmaDecayLabel)
{
//[UserLabelCode_sigmaDecayLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setSigmaDecay(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_sigmaDecayLabel]
}
else if (labelThatHasChanged == weightDecayLabel)
{
//[UserLabelCode_weightDecayLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setWeightDecay(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_weightDecayLabel]
}
else if (labelThatHasChanged == momentumLabel)
{
//[UserLabelCode_momentumLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setMomentum(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_momentumLabel]
}
else if (labelThatHasChanged == sparsityLearningRateLabel)
{
//[UserLabelCode_sparsityLearningRateLabel] -- add your label text handling code here..
m_pRbmComponentCurr->setMuSparsity(labelThatHasChanged->getText().getFloatValue());
//[/UserLabelCode_sparsityLearningRateLabel]
}
else if (labelThatHasChanged == weightInitLabel)
{
//[UserLabelCode_weightInitLabel] -- add your label text handling code here..
//[/UserLabelCode_weightInitLabel]
}
//[UserlabelTextChanged_Post]
//[/UserlabelTextChanged_Post]
}
void MainComponent::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
{
//[UsercomboBoxChanged_Pre]
//[/UsercomboBoxChanged_Pre]
if (comboBoxThatHasChanged == m_rbmSelect)
{
//[UserComboBoxCode_m_rbmSelect] -- add your combo box handling code here..
m_pRbmComponentCurr = m_pRbmComponent[m_rbmSelect->getSelectedId()-1];
m_weightsCurr = m_weights[m_rbmSelect->getSelectedId()-1];
if (m_pRbmComponentCurr == nullptr)
{
create();
}
updateControls();
//[/UserComboBoxCode_m_rbmSelect]
}
//[UsercomboBoxChanged_Post]
//[/UsercomboBoxChanged_Post]
}
void MainComponent::mouseMove (const MouseEvent& e)
{
//[UserCode_mouseMove] -- Add your code here...
//[/UserCode_mouseMove]
}
void MainComponent::mouseEnter (const MouseEvent& e)
{
//[UserCode_mouseEnter] -- Add your code here...
//[/UserCode_mouseEnter]
}
void MainComponent::mouseExit (const MouseEvent& e)
{
//[UserCode_mouseExit] -- Add your code here...
//[/UserCode_mouseExit]
}
void MainComponent::mouseDown (const MouseEvent& e)
{
//[UserCode_mouseDown] -- Add your code here...
//[/UserCode_mouseDown]
}
void MainComponent::mouseDrag (const MouseEvent& e)
{
//[UserCode_mouseDrag] -- Add your code here...
// e.eventComponent->setCentrePosition(e.getPosition().x, e.getPosition().y);
cout << "Mouse = " << e.x << "," << e.y << endl;
//[/UserCode_mouseDrag]
}
void MainComponent::mouseUp (const MouseEvent& e)
{
//[UserCode_mouseUp] -- Add your code here...
//[/UserCode_mouseUp]
}
void MainComponent::mouseDoubleClick (const MouseEvent& e)
{
//[UserCode_mouseDoubleClick] -- Add your code here...
//[/UserCode_mouseDoubleClick]
}
void MainComponent::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& wheel)
{
//[UserCode_mouseWheelMove] -- Add your code here...
//[/UserCode_mouseWheelMove]
}
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
void MainComponent::save ()
{
m_weights[0]->save((String(getBaseDir() + String(".weights.dat"))).toUTF8());
}
void MainComponent::create(juce::String const &projectName)
{
size_t id = m_rbmSelect->getSelectedId()-1;
bool shouldAddItem = true;
if (id == 0)
{
m_rbmSelect->clear(dontSendNotification);
m_rbmSelect->addItem(String(id), id+1);
m_rbmSelect->setSelectedId(id+1, dontSendNotification);
for (size_t i=0; i < DBN_SIZE; i++)
{
m_weights[i] = nullptr;
m_pRbmComponent[i] = nullptr;
}
if (!projectName.isEmpty())
{
m_weights[id] = new Weights((String(projectName + String(".weights.dat"))).toUTF8());
loadTraining((String(projectName + String(".trainingStates.dat"))).toUTF8());
}
else
{
m_weights[id] = new Weights(numVisibleLabel->getText().getIntValue(), numVisibleYLabel->getText().getIntValue(), numHiddenLabel->getText().getIntValue());
}
addAndMakeVisible(m_pRbmComponent[id] = new RbmComponent(*m_weights[id], m_layers.data(), *this));
}
else
{
shouldAddItem = m_pRbmComponent[id] == nullptr;
m_weights[id] = nullptr;
m_pRbmComponent[id] = nullptr;
m_weights[id] = new Weights(m_weights[id-1]->getNumHidden(), 1, numHiddenLabel->getText().getIntValue());
addAndMakeVisible(m_pRbmComponent[id] = new RbmComponent(*m_weights[id], m_pRbmComponent[id-1]->getHiddenBatch(), *this));
m_pRbmComponent[id-1]->registerRbm(m_pRbmComponent[id]);
}
m_pRbmComponentCurr = m_pRbmComponent[id];
m_weightsCurr = m_weights[id];
m_pRbmComponentCurr->setBounds (16, 140*id+16, 430, 130);
m_pRbmComponentCurr->batchchanged();
m_pRbmComponentCurr->redrawReconstruction();
if (((id+1) < DBN_SIZE) and shouldAddItem)
m_rbmSelect->addItem(String(id+1), id+2);
updateControls();
}
void MainComponent::destroy()
{
}
const juce::String& MainComponent::getBaseDir()
{
m_baseDir = String("./") + projectNameLabel->getText();
return m_baseDir;
}
void MainComponent::run()
{
// trainButton->setEnabled(false);
m_pRbmComponentCurr->train(numEpochslabel->getText().getIntValue());
// trainButton->setEnabled(true);
}
void MainComponent::onChanged(const LayerArray &obj)
{
patterSlider->setRange(0, obj.getSize()-1, 1);
}
void MainComponent::onProgressChanged(size_t progressPercent)
{
m_progressBarSlider->setValue(progressPercent);
}
void MainComponent::updateControls()
{
rbmDoRaoBlackwellToggleButton->setToggleState(m_pRbmComponentCurr->params().m_doRaoBlackwell, dontSendNotification);
rbmReduceVarianceToggleButton->setToggleState(m_pRbmComponentCurr->params().m_useProbsForHiddenReconstruction, dontSendNotification);
rbmUseVisibleGaussianToggleButton->setToggleState(m_pRbmComponentCurr->params().m_useVisibleGaussian, dontSendNotification);
rbmDoSparseToggleButton->setToggleState(m_pRbmComponentCurr->params().m_doSparse, dontSendNotification);
rbmLearnVarianceButton->setToggleState(m_pRbmComponentCurr->params().m_doLearnVariance, dontSendNotification);
lambdaLabel->setText(String(m_pRbmComponentCurr->params().m_lambda), dontSendNotification);
sigmaDecayLabel->setText(String(m_pRbmComponentCurr->params().m_sigmaDecay), dontSendNotification);
weightDecayLabel->setText(String(m_pRbmComponentCurr->params().m_weightDecay), dontSendNotification);
sparsityLabel->setText(String(m_pRbmComponentCurr->params().m_sparsity), dontSendNotification);
sigmaLabel->setText(String(m_pRbmComponentCurr->params().m_constantSigma), dontSendNotification);
sparsityLearningRateLabel->setText(String(m_pRbmComponentCurr->params().m_muSparsity), dontSendNotification);
learningRateLabel->setText(String(m_pRbmComponentCurr->params().m_muWeights), dontSendNotification);
momentumLabel->setText(String(m_pRbmComponentCurr->params().m_momentum), dontSendNotification);
numVisibleLabel->setText(String(m_weightsCurr->getNumVisibleX()), dontSendNotification );
numVisibleYLabel->setText(String(m_weightsCurr->getNumVisibleY()), dontSendNotification );
numHiddenLabel->setText(String(m_weightsCurr->getNumHidden()), dontSendNotification );
WeightsSlider->setRange(0, m_weightsCurr->getNumHidden()-1, 1);
numGibbsSlider->setValue(m_pRbmComponentCurr->params().m_numGibbs);
WeightsSlider->setValue(m_pRbmComponentCurr->getWeightsIndex());
patterSlider->setValue(m_pRbmComponentCurr->getTrainingIndex());
}
//[/MiscUserCode]
//==============================================================================
#if 0
/* -- Introjucer information section --
This is where the Introjucer stores the metadata that describe this GUI layout, so
make changes in here at your peril!
BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="MainComponent" componentName=""
parentClasses="public Component, public RbmComponentListener, public LayerArrayListener, public Thread"
constructorParams="" variableInitialisers="Thread(&quot;RBM&quot;),&#10;m_pRbmComponentCurr(nullptr),&#10;m_weightsCurr(nullptr),&#10;m_layers(this)"
snapPixels="4" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="1" initialWidth="1000" initialHeight="600">
<METHODS>
<METHOD name="mouseMove (const MouseEvent&amp; e)"/>
<METHOD name="mouseEnter (const MouseEvent&amp; e)"/>
<METHOD name="mouseExit (const MouseEvent&amp; e)"/>
<METHOD name="mouseDown (const MouseEvent&amp; e)"/>
<METHOD name="mouseDrag (const MouseEvent&amp; e)"/>
<METHOD name="mouseUp (const MouseEvent&amp; e)"/>
<METHOD name="mouseDoubleClick (const MouseEvent&amp; e)"/>
<METHOD name="mouseWheelMove (const MouseEvent&amp; e, const MouseWheelDetails&amp; wheel)"/>
</METHODS>
<BACKGROUND backgroundColour="ffffffff">
<TEXT pos="500 138 80 14" fill="solid: ff000000" hasStroke="0" text="Sigma"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="588 138 80 14" fill="solid: ff000000" hasStroke="0" text="Lambda"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="491 186 91 14" fill="solid: ff000000" hasStroke="0" text="Num. epochs"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="588 186 80 14" fill="solid: ff000000" hasStroke="0" text="Alpha"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="676 138 80 14" fill="solid: ff000000" hasStroke="0" text="Sparsity"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="764 138 96 14" fill="solid: ff000000" hasStroke="0" text="Sigma decay"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="764 186 96 14" fill="solid: ff000000" hasStroke="0" text="Weight decay"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="676 186 80 14" fill="solid: ff000000" hasStroke="0" text="Momentum"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="876 138 96 14" fill="solid: ff000000" hasStroke="0" text="Sparsity Alpha"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
<TEXT pos="876 186 96 14" fill="solid: ff000000" hasStroke="0" text="Weight init"
fontname="Default font" fontsize="15" bold="0" italic="0" justification="36"/>
</BACKGROUND>
<TEXTBUTTON name="Train button" id="7909d74b5522987c" memberName="trainButton"
virtualName="" explicitFocusOrder="0" pos="592 240 72 24" buttonText="Train"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="Add button" id="4609f7b526ec1aef" memberName="addButton"
virtualName="" explicitFocusOrder="0" pos="496 20 72 24" buttonText="Add"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<SLIDER name="Pattern slider" id="c3e0a2c816db81d1" memberName="patterSlider"
virtualName="" explicitFocusOrder="0" pos="696 280 184 24" min="0"
max="0" int="1" style="LinearBar" textBoxPos="TextBoxLeft" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TEXTBUTTON name="Reconstruct button" id="c1901d121a5819d6" memberName="reconstructButton"
virtualName="" explicitFocusOrder="0" pos="496 240 72 24" buttonText="Reconstruct"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="Shake button" id="7fa4964a9a9ed199" memberName="ShakeButton"
virtualName="" explicitFocusOrder="0" pos="592 280 72 24" buttonText="Shake"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<SLIDER name="Weights slider" id="699075a1fc01458a" memberName="WeightsSlider"
virtualName="" explicitFocusOrder="0" pos="696 320 184 24" min="0"
max="0" int="1" style="LinearBar" textBoxPos="TextBoxLeft" textBoxEditable="1"
textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<LABEL name="Num Epochs label" id="b23ae372ee931474" memberName="numEpochslabel"
virtualName="" explicitFocusOrder="0" pos="504 200 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="1000" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="Learning Rate label" id="49611a27914e910d" memberName="learningRateLabel"
virtualName="" explicitFocusOrder="0" pos="592 200 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="0.01" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TEXTBUTTON name="Test button" id="a1e6fed732ae7ee1" memberName="testButton"
virtualName="" explicitFocusOrder="0" pos="592 20 72 24" buttonText="Test"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<LABEL name="Num Visible label" id="60acd702770b77dd" memberName="numVisibleLabel"
virtualName="" explicitFocusOrder="0" pos="736 368 48 24" edTextCol="ff000000"
edBkgCol="0" labelText="16" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="Num Hidden label" id="8a56c0419bd3ce86" memberName="numHiddenLabel"
virtualName="" explicitFocusOrder="0" pos="840 368 48 24" edTextCol="ff000000"
edBkgCol="0" labelText="64" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TEXTBUTTON name="Create button" id="6c71593a581844eb" memberName="createButton"
virtualName="" explicitFocusOrder="0" pos="660 368 72 24" buttonText="Create"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<LABEL name="Project Name label" id="b4e855167abdac6b" memberName="projectNameLabel"
virtualName="" explicitFocusOrder="0" pos="892 368 96 24" edTextCol="ff000000"
edBkgCol="0" labelText="test" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TEXTBUTTON name="Load button" id="4e606c77b12e7d11" memberName="loadButton"
virtualName="" explicitFocusOrder="0" pos="496 368 72 24" buttonText="Load"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="Save button" id="c435e774a51e39bf" memberName="saveButton"
virtualName="" explicitFocusOrder="0" pos="576 368 72 24" buttonText="Save"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<LABEL name="Num Visible Y label" id="101a4f77ca2445ba" memberName="numVisibleYLabel"
virtualName="" explicitFocusOrder="0" pos="788 368 48 24" edTextCol="ff000000"
edBkgCol="0" labelText="16" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TEXTBUTTON name="Load Training button" id="c603a32c128de05d" memberName="loadTrainingButton"
virtualName="" explicitFocusOrder="0" pos="496 404 72 24" buttonText="Load T"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="Save Training button" id="8e665b97490357c4" memberName="saveTrainingButton"
virtualName="" explicitFocusOrder="0" pos="576 404 72 24" buttonText="Save T"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="Clear Training button" id="b4c148828519c013" memberName="clearTrainingButton"
virtualName="" explicitFocusOrder="0" pos="736 404 72 24" buttonText="Clear T"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TEXTBUTTON name="Remove Training button" id="f0e1d068c39986f3" memberName="removeTrainingButton"
virtualName="" explicitFocusOrder="0" pos="656 404 72 24" buttonText="Remove T"
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<SLIDER name="Num. Gibbs slider" id="fdd9d5ca4e05e18c" memberName="numGibbsSlider"
virtualName="" explicitFocusOrder="0" pos="696 240 184 24" min="1"
max="101" int="1" style="LinearBar" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<TEXTBUTTON name="Reconstruct Equilibrium button" id="208a587f5556207" memberName="reconstructEquButton"
virtualName="" explicitFocusOrder="0" pos="496 280 72 24" buttonText="Reconst Equ."
connectedEdges="0" needsCallback="1" radioGroupId="0"/>
<TOGGLEBUTTON name="rbmDoRaoBlackwell toggle button" id="7f585de46e182418"
memberName="rbmDoRaoBlackwellToggleButton" virtualName="" explicitFocusOrder="0"
pos="496 60 112 24" buttonText="Rao-Blackwell" connectedEdges="0"
needsCallback="1" radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="rbmReduceVariance toggle button" id="1636f6389abe9225"
memberName="rbmReduceVarianceToggleButton" virtualName="" explicitFocusOrder="0"
pos="640 60 128 24" buttonText="Reduce Variance" connectedEdges="0"
needsCallback="1" radioGroupId="0" state="0"/>
<LABEL name="Lambda label" id="c51a5dfb587390b4" memberName="lambdaLabel"
virtualName="" explicitFocusOrder="0" pos="592 152 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="1.0" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="Sigma label" id="68d7dad32ed357f8" memberName="sigmaLabel"
virtualName="" explicitFocusOrder="0" pos="504 152 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="1.0" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TOGGLEBUTTON name="rbmUseVisibleGaussian toggle button" id="c89b32a4deaa7f19"
memberName="rbmUseVisibleGaussianToggleButton" virtualName=""
explicitFocusOrder="0" pos="640 92 160 24" buttonText="Use gaussian visible"
connectedEdges="0" needsCallback="1" radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="rbmDoSparse toggle button" id="ed3f2602ab35b5f2" memberName="rbmDoSparseToggleButton"
virtualName="" explicitFocusOrder="0" pos="496 92 128 24" buttonText="Do sparse"
connectedEdges="0" needsCallback="1" radioGroupId="0" state="0"/>
<LABEL name="Sparsity label" id="f4efe44dc0ca4894" memberName="sparsityLabel"
virtualName="" explicitFocusOrder="0" pos="680 152 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="0.05" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="SigmaDecay label" id="d5f2f5fffdafd926" memberName="sigmaDecayLabel"
virtualName="" explicitFocusOrder="0" pos="776 152 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="1.0" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="WeightDecay label" id="67bf3a0bec436468" memberName="weightDecayLabel"
virtualName="" explicitFocusOrder="0" pos="776 200 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="0.0" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<SLIDER name="progressBar slider" id="8c8748f39f6d0ec6" memberName="m_progressBarSlider"
virtualName="" explicitFocusOrder="0" pos="688 20 184 24" min="0"
max="100" int="1" style="LinearBar" textBoxPos="TextBoxLeft"
textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/>
<LABEL name="Momentum label" id="570ca1355ccd4cdd" memberName="momentumLabel"
virtualName="" explicitFocusOrder="0" pos="680 200 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="0.5" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="SparsityLearn label" id="8e452129810c0ed3" memberName="sparsityLearningRateLabel"
virtualName="" explicitFocusOrder="0" pos="888 152 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="0.01" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<LABEL name="WeightInit label" id="c827025f2cc51ddf" memberName="weightInitLabel"
virtualName="" explicitFocusOrder="0" pos="888 200 72 24" edTextCol="ff000000"
edBkgCol="0" labelText="0.001" editableSingleClick="1" editableDoubleClick="1"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TOGGLEBUTTON name="rbmLearnVariance button" id="92c647c1f8b110a2" memberName="rbmLearnVarianceButton"
virtualName="" explicitFocusOrder="0" pos="808 60 128 24" buttonText="Learn Variance"
connectedEdges="0" needsCallback="1" radioGroupId="0" state="0"/>
<TOGGLEBUTTON name="rbmNormalizeData toggle button" id="739772af1b096120" memberName="rbmNormalizeDataToggleButton"
virtualName="" explicitFocusOrder="0" pos="808 92 160 24" buttonText="Normalize data"
connectedEdges="0" needsCallback="1" radioGroupId="0" state="0"/>
<COMBOBOX name="RBM Selector" id="71115a4f965bfd38" memberName="m_rbmSelect"
virtualName="" explicitFocusOrder="0" pos="844 404 62 24" editable="0"
layout="33" items="" textWhenNonSelected="" textWhenNoItems="(no choices)"/>
</JUCER_COMPONENT>
END_JUCER_METADATA
*/
#endif
//[EndFile] You can add extra defines here...
//[/EndFile]