- refactored
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@818 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+2
-17
@@ -143,23 +143,8 @@ void Layer::calcContextBatch(arma::mat& batch)
|
||||
|
||||
void Layer::train(const arma::mat& batch, IListener* pListener)
|
||||
{
|
||||
Rbm::train(trainingData(batch), pListener);
|
||||
}
|
||||
|
||||
arma::mat Layer::trainingData(const arma::mat& batch)
|
||||
{
|
||||
arma::mat thisBatch = batch;
|
||||
Layer *pLayer = root();
|
||||
while (pLayer)
|
||||
{
|
||||
if (pLayer == this)
|
||||
{
|
||||
break;
|
||||
}
|
||||
thisBatch = pLayer->toHiddenProbs(thisBatch);
|
||||
pLayer = pLayer->next;
|
||||
}
|
||||
return thisBatch;
|
||||
std::cout << m_name << ": " << " Training of layer " << std::to_string(id()) << std::endl;
|
||||
Rbm::train(batch, pListener);
|
||||
}
|
||||
|
||||
bool Layer::weightsLoad(std::string const &dir, std::string const &prj)
|
||||
|
||||
Reference in New Issue
Block a user