diff --git a/source/MainComponent.cpp b/source/MainComponent.cpp index 03b4ca2..3946e76 100644 --- a/source/MainComponent.cpp +++ b/source/MainComponent.cpp @@ -198,7 +198,7 @@ MainComponent::MainComponent (const String prjname) addAndMakeVisible (lambdaLabel = new Label ("Lambda label", TRANS("1.0"))); - lambdaLabel->setTooltip (TRANS("Unused")); + lambdaLabel->setTooltip (TRANS("L1 regularization strength (sparsity)")); lambdaLabel->setFont (Font (15.00f, Font::plain)); lambdaLabel->setJustificationType (Justification::centred); lambdaLabel->setEditable (true, true, false); @@ -411,7 +411,7 @@ void MainComponent::paint (Graphics& g) g.setColour (Colours::black); g.setFont (Font (15.00f, Font::plain)); - g.drawText (TRANS("Lambda"), + g.drawText (TRANS("L1 Lambda"), 648, 138, 80, 14, Justification::centred, true); @@ -441,7 +441,7 @@ void MainComponent::paint (Graphics& g) g.setColour (Colours::black); g.setFont (Font (15.00f, Font::plain)); - g.drawText (TRANS("Weight decay"), + g.drawText (TRANS("L2 Lambda"), 824, 186, 96, 14, Justification::centred, true); @@ -764,6 +764,7 @@ void MainComponent::labelTextChanged (Label* labelThatHasChanged) else if (labelThatHasChanged == lambdaLabel) { //[UserLabelCode_lambdaLabel] -- add your label text handling code here.. + m_pLayer->params().l1Lambda = labelThatHasChanged->getText().getFloatValue(); //[/UserLabelCode_lambdaLabel] } else if (labelThatHasChanged == sigmaLabel) @@ -948,6 +949,7 @@ void MainComponent::updateControls() rbmDoSampleHidden->setToggleState(m_pLayer->params().gibbsDoSampleHidden, dontSendNotification); weightDecayLabel->setText(String(m_pLayer->params().l2Lambda), dontSendNotification); + lambdaLabel->setText(String(m_pLayer->params().l1Lambda), dontSendNotification); learningRateLabel->setText(String(m_pLayer->params().learningRate), dontSendNotification); momentumLabel->setText(String(m_pLayer->params().momentum), dontSendNotification); numVisibleLabel->setText(String(m_pLayer->numVisibleX()), dontSendNotification ); diff --git a/source/RbmComponent.cpp b/source/RbmComponent.cpp index e5fb615..5bcd70d 100644 --- a/source/RbmComponent.cpp +++ b/source/RbmComponent.cpp @@ -105,7 +105,7 @@ void RbmComponent::paint (Graphics& g) g.setColour (Colours::black); g.setFont (Font (15.00f, Font::plain)); - g.drawText (TRANS("Lambda"), + g.drawText (TRANS("L1 Lambda"), 120, 306, 80, 14, Justification::centred, true); @@ -135,7 +135,7 @@ void RbmComponent::paint (Graphics& g) g.setColour (Colours::black); g.setFont (Font (15.00f, Font::plain)); - g.drawText (TRANS("Weight decay"), + g.drawText (TRANS("L2 Lambda"), 296, 354, 96, 14, Justification::centred, true);