- added original implementation for binary RBM

This commit is contained in:
2024-01-24 18:41:42 +01:00
parent 84a5dd4550
commit a5ed0be991
2 changed files with 131 additions and 20 deletions
+3 -3
View File
@@ -37,8 +37,8 @@ namespace Matutils
inline arma::mat sample(const arma::mat &src)
{
arma::mat dst = src;
uniform(dst);
arma::mat rand = src;
uniform(rand);
#if 0
for (size_t i=0; i < src.n_rows; i++)
@@ -50,7 +50,7 @@ namespace Matutils
}
return dst;
#else
arma::umat res = (dst < src);
arma::umat res = (src > rand);
return arma::conv_to<arma::mat>::from(res);
#endif