- pulled LayerArray out of RbmComponent

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@293 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2016-06-16 19:16:33 +00:00
parent 4dccddd50f
commit ff88a62e73
5 changed files with 56 additions and 64 deletions
+8 -4
View File
@@ -238,7 +238,6 @@ public:
MatrixXd sumBiasH(1, m_w.getNumHidden());
MatrixXd sumWeights(m_w.getNumVisible(), m_w.getNumHidden());
MatrixXd deltaVar(MatrixXd::Zero(1, m_w.getNumVisible()));
MatrixXd deltaBiasV(MatrixXd::Zero(1, m_w.getNumVisible()));
MatrixXd deltaBiasH(MatrixXd::Zero(1, m_w.getNumHidden()));
MatrixXd deltaWeights(MatrixXd::Zero(m_w.getNumVisible(), m_w.getNumHidden()));
@@ -303,7 +302,7 @@ public:
}
}
// Create hidden reconstruction given v
// Create hidden representation given v
toHiddenBatch(m_h, m_v);
probsLogistic(m_h);
}
@@ -329,8 +328,8 @@ public:
if (m_doSparse)
{
m_h = m_v * m_w.weights();
m_h += m_w.hiddenBias().replicate(batchSize, 1);
// Create hidden representation given v
toHiddenBatch(m_h, m_v);
probsLogistic(m_h);
sumBiasH.fill(m_sparsity);
@@ -515,6 +514,11 @@ public:
return m_v;
}
MatrixXd const& getBatch()
{
return m_batch;
}
private:
Weights &m_w;
MatrixXd const &m_batch;