<p>Finally, I can run the Train function without crash, but the training results is correct or good enough or not is another question, need more test.</p>

<p>Sample codes : </p>

<pre><code>const arma::mat trainData = arma::randu&lt;arma::mat&gt;(2,4);
const size_t visibleSize = trainData.n_rows;
const size_t hiddenSize = trainData.n_rows / 2;    

using AnnSae = ann::LogisticSparseAutoencoder&lt;&gt;;
size_t const batch_size = trainData.n_cols;
size_t const epoch = 100;
AnnSae  sae(visibleSize, hiddenSize, batch_size);
sae.Train(trainData, epoch);
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/451#issuecomment-166157389">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFA-s_bj5sz3bUxZM-1_RkjgXTO3Qks5pRxrUgaJpZM4GAqt4.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/451#issuecomment-166157389"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>