<blockquote>
<p>why not just pass in the maximalInput?</p>
</blockquote>

<p>Correct me if I've misunderstood---there is a maximal input for each hidden unit in the autoencoder.  So if your autoencoder has 40 hidden units, then that's 40 different maximal inputs that you want.  So you could get each of them by calling <code>MaximalInput()</code> with the indices 0 to 39.  Alternately, if the input type is a vector type (<code>arma:;vec</code> or <code>arma::sp_vec</code> or something like that), then it would be easy to create a <code>MaximalInputs()</code> function instead that returned each maximal input in a column of the given matrix.  If you want to implement one of those, either works.</p>

<blockquote>
<p>This remind me, there are other types of autoencoder, like transforming autoencoder, tied autoencoder, maybe there will be more families of autoencoder pop out in the futures, and they could be sparse too. Maybe we should factor out the sparse constraint as another policy? That is, provide an Autoencoder class which allowed to add the sparsity as constraint, then this autoencoder will become SparseAutoencoder. If the sparsity is added, the tied autoencoder will become tied sparse autoencoder and so on.</p>

<p>How should we factored out that sparse constraint is a problem.</p>

<p>By the way, any interesting to implement other autoencoder?I would like to start from tied autoencoder first after SparseAutoencoder finished the refactor</p>
</blockquote>

<p>Yeah, definitely I think more autoencoders is interesting, but I still think we should find a way to merge the codebase with the ANN code.  I haven't put sufficient thought into how to do that, though.  I think another one of the issues or pull requests you've opened has an idea for how to integrate the two.  Once the two were integrated, it would probably be a lot simpler to design arbitrary types of autoencoders.</p>

<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/issues/452#issuecomment-150568734">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDZ5qMWAEYpQCcrUTwGRhIB5mLzWks5o-it4gaJpZM4GA0ZB.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/issues/452#issuecomment-150568734"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>