- refactored
- use Armadillo for load/save of weight and training data git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@775 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -814,7 +814,7 @@ void MainComponent::comboBoxChanged (ComboBox* comboBoxThatHasChanged)
|
||||
m_pLayer = static_cast<RbmComponent*>(m_stack->getLayer(index));
|
||||
updateControls();
|
||||
m_pLayer->redrawWeights(m_weightIndex);
|
||||
if (m_stack->trainingData().n_rows > 0)
|
||||
if (m_stack->trainingBatch().n_rows > 0)
|
||||
{
|
||||
m_pLayer->setTrainingData(trainingAt(m_trainingIndex));
|
||||
}
|
||||
@@ -878,7 +878,7 @@ void MainComponent::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails
|
||||
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
|
||||
void MainComponent::save ()
|
||||
{
|
||||
m_stack->saveTraining();
|
||||
m_stack->saveTrainingBatch();
|
||||
m_stack->saveWeights();
|
||||
m_stack->save();
|
||||
}
|
||||
@@ -899,7 +899,7 @@ const juce::String& MainComponent::getBaseDir()
|
||||
void MainComponent::run()
|
||||
{
|
||||
trainButton->setButtonText (TRANS("Stop"));
|
||||
m_pLayer->setBatch(m_stack->trainingData());
|
||||
m_pLayer->setBatch(m_stack->trainingBatch());
|
||||
m_pLayer->train(this);
|
||||
trainButton->setButtonText (TRANS("Train"));
|
||||
}
|
||||
@@ -916,7 +916,7 @@ bool MainComponent::onProgress(Rbm *pRbm, const Rbm::Status &status)
|
||||
}
|
||||
|
||||
RbmComponent *pComp = static_cast<RbmComponent*>(pRbm);
|
||||
pComp->upPass(pComp->getTraining());
|
||||
pComp->upPass(pComp->getTrainingPattern());
|
||||
pComp->redrawReconstruction();
|
||||
pComp->redrawWeights();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user