- added setBatch()

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@771 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-10 10:36:55 +00:00
parent e240eae073
commit 648d8a002e
6 changed files with 19 additions and 8 deletions
+7 -1
View File
@@ -126,7 +126,12 @@ public:
m_bv.submat(0, 0, bv.n_rows-1, bv.n_cols-1) = bv;
}
void train(arma::mat const &batch, IListener *pListener=nullptr);
void setBatch(arma::mat const &batch)
{
m_batch = batch;
}
void train(IListener *pListener=nullptr);
static arma::mat normalize(const arma::mat &hidden);
const arma::mat& whv() const;
@@ -179,6 +184,7 @@ protected:
private:
noise_gen_t m_noise;
arma::mat m_whv;
arma::mat m_batch;
};