- LayerArray: added copy constructor

- minor changes

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@42 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-10-26 08:46:13 +00:00
parent 376f2dfa35
commit 6520c80eca
3 changed files with 19 additions and 6 deletions
+3 -1
View File
@@ -63,7 +63,7 @@ public:
Noise_Free(&m_noise);
}
void train(LayerArray<VisibleLayer> &vt, uint32_t numEpochs, double sigmaMin = 0.05)
void train(const LayerArray<VisibleLayer> &batch, uint32_t numEpochs, double sigmaMin = 0.05)
{
uint32_t t, i;
uint32_t epoch;
@@ -81,6 +81,8 @@ public:
MatrixXd sumWeights(m_w.getNumVisible(), m_w.getNumHidden());
MatrixXd deltaWeights(m_w.getNumVisible(), m_w.getNumHidden());
const LayerArray<VisibleLayer> &vt = batch;
sigma = m_sigma;
double dProgress = 1.0/numEpochs;