- added original implementation for binary RBM
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user