[RBM]
- refactored RbmComponent git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@294 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -309,6 +309,67 @@ void RbmComponent::setSigma(double value)
|
||||
redrawReconstruction();
|
||||
}
|
||||
|
||||
void RbmComponent::setNormalizeData(bool enable)
|
||||
{
|
||||
m_pRbm->setNormalizeData(enable);
|
||||
}
|
||||
|
||||
void RbmComponent::setMuWeights(double value)
|
||||
{
|
||||
m_pRbm->setMuWeights(value);
|
||||
}
|
||||
|
||||
void RbmComponent::setMuSparsity(double value)
|
||||
{
|
||||
m_pRbm->setMuSparsity(value);
|
||||
}
|
||||
|
||||
void RbmComponent::setMomentum(double value)
|
||||
{
|
||||
m_pRbm->setMomentum(value);
|
||||
}
|
||||
|
||||
void RbmComponent::addFromTraining()
|
||||
{
|
||||
DrawReconstruction->getData() = DrawTraining->getData();
|
||||
DrawReconstruction->DrawData();
|
||||
|
||||
}
|
||||
|
||||
void RbmComponent::setWeightsIndex(size_t index)
|
||||
{
|
||||
m_currWeightIndexToDraw = index;
|
||||
redrawWeights();
|
||||
}
|
||||
|
||||
void RbmComponent::setTrainingIndex(size_t index)
|
||||
{
|
||||
if (m_pRbm->getBatch().rows() > 0)
|
||||
{
|
||||
m_currTrainingIndexToDraw = index;
|
||||
DrawTraining->getData() = m_pRbm->getBatch().row(index);
|
||||
DrawTraining->DrawData();
|
||||
|
||||
redrawReconstruction();
|
||||
}
|
||||
}
|
||||
|
||||
void RbmComponent::copyReconstructionToTraining()
|
||||
{
|
||||
DrawTraining->getData() = DrawReconstruction->getData();
|
||||
DrawTraining->DrawData();
|
||||
}
|
||||
|
||||
void RbmComponent::train(size_t numEpochs)
|
||||
{
|
||||
m_pRbm->train(numEpochs);
|
||||
}
|
||||
|
||||
RowVectorXd const& RbmComponent::getTrainingData()
|
||||
{
|
||||
return DrawTraining->getData();
|
||||
}
|
||||
|
||||
//[/MiscUserCode]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user