- refactored

- compile clean

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@776 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-10 15:28:00 +00:00
parent ff2086a1ff
commit bfbd837ed5
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -916,7 +916,7 @@ bool MainComponent::onProgress(Rbm *pRbm, const Rbm::Status &status)
}
RbmComponent *pComp = static_cast<RbmComponent*>(pRbm);
pComp->upPass(pComp->getTrainingPattern());
pComp->upPass(pComp->getTraining());
pComp->redrawReconstruction();
pComp->redrawWeights();
+5 -5
View File
@@ -215,11 +215,11 @@ void RbmComponent::onDraw(DrawComponent &obj)
}
if (&obj == DrawVisibleTrain)
{
upDownPass(getTrainingPattern());
upDownPass(getTraining());
}
if (&obj == DrawContextTrain)
{
upDownPass(getTrainingPattern());
upDownPass(getTraining());
}
}
@@ -249,14 +249,14 @@ void RbmComponent::buttonClicked(Button* buttonThatWasClicked)
else if (buttonThatWasClicked == m_buttonCopyH2C)
{
DrawContextTrain->getData() = DrawHidden->getData();
upDownPass(getTrainingPattern());
upDownPass(getTraining());
}
}
void RbmComponent::redrawReconstruction()
{
RbmComponent *pComp = static_cast<RbmComponent*> (root());
pComp->upDownPass(pComp->getTrainingPattern());
pComp->upDownPass(pComp->getTraining());
}
void RbmComponent::gibbs(const arma::mat& vc)
@@ -277,7 +277,7 @@ void RbmComponent::gibbs(const arma::mat& vc)
DrawContextReconst->DrawData();
}
arma::mat RbmComponent::getTrainingPattern() const
arma::mat RbmComponent::getTraining() const
{
return arma::join_rows(DrawVisibleTrain->getData(), DrawContextTrain->getData());
}
+1 -1
View File
@@ -73,7 +73,7 @@ public:
ScopedPointer<DrawComponent> DrawVisibleTrain;
ScopedPointer<DrawComponent> DrawHidden;
ScopedPointer<DrawComponent> DrawContextTrain;
arma::mat getTrainingPattern() const;
arma::mat getTraining() const;
arma::mat getReconst() const;
void trainRedraw(const arma::mat& vc);
void reconstRedraw(const arma::mat& vc);
+1 -1
View File
@@ -286,7 +286,7 @@ size_t Stack::loadTrainingBatch(bool doNormalize)
if (doNormalize)
{
m_trainingBatch = Rbm::normalize(m_trainingData);
m_trainingBatch = Rbm::normalize(m_trainingBatch);
}
return numTraining;
}