- weights and biases are allocated outside Rbm

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@565 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-10-22 06:30:21 +00:00
parent 675a5485fe
commit de33b3ecbd
3 changed files with 22 additions and 13 deletions
+7 -4
View File
@@ -14,10 +14,10 @@
#include "Rbm.hpp"
#include "noise.h"
Rbm::Rbm(size_t numVisible, size_t numHidden)
: m_w(numVisible, numHidden)
, m_bh(1, numHidden)
, m_bv(1, numVisible)
Rbm::Rbm(arma::mat &w, arma::mat &bv, arma::mat &bh)
: m_w(w)
, m_bv(bv)
, m_bh(bh)
{
Noise_Init(&m_noise, 0x32727155);
uniform(m_w);
@@ -26,6 +26,9 @@ Rbm::Rbm(size_t numVisible, size_t numHidden)
}
Rbm::Rbm(const Rbm& orig)
: m_w(orig.m_w)
, m_bv(orig.m_bv)
, m_bh(orig.m_bh)
{
}