- fixed gui wiring

git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@764 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-01-09 12:36:45 +00:00
parent 7fed7cea88
commit 5427287838
5 changed files with 95 additions and 46 deletions
+15
View File
@@ -313,6 +313,21 @@ arma::mat Rbm::sample(const arma::mat &src)
return dst;
}
arma::mat Rbm::vc_to_v(const arma::mat &vc) const
{
return arma::reshape(vc, 1, numVisible() - numContext());
}
arma::mat Rbm::vc_to_c(const arma::mat &vc) const
{
return vc.submat(0, numVisible() - numContext(), 0, numVisible() - 1);
}
arma::mat Rbm::to_vc(const arma::mat &v, const arma::mat &c) const
{
return arma::join_rows(v, c);
}
arma::mat Rbm::v_to_h(const arma::mat &visible) const
{
return visible * m_whv + arma::repmat(m_bhv, visible.n_rows, 1);