<p>Okay, now that <a href="https://github.com/mlpack/mlpack/issues/452" class="issue-link" title="[Proposal]Add a function to visualize the results of sparse_autoencoder">#452</a> is done, let's consider this one. :)</p>

<p>I want to make sure I'm on the same page as what's going on here, so please correct anything I've written below:</p>

<p>The idea are to improve the speed of the sparse autoencoder and flexibility of the sparse autoencoder, by reusing the code from <code>src/mlpack/methods/ann/</code>, which is both faster and allows the user to use different hidden layer types (like something other than the usual sigmoid layer).  Using a separate class called <code>SparseAutoencoder</code> could help keep users from getting confused with the tons of different options available with the ANN code.</p>

<p>I think that's a kind of accurate summary of what you're trying to do; if not, please correct it. :)  I am in support of this; for me, the primary two important things here are that (1) we can improve the speed of the <code>SparseAutoencoder</code> and (2) we can reuse the ANN code and remove virtually all of the existing code for <code>SparseAutoencoder</code>.  It would also be very nice that we could get more flexibility.</p>

<p>Before I start digging too much, do you think we could use the ANN code entirely to represent the sparse autoencoder?  i.e. <code>SparseAutoencoder</code> is actually a typedef of <code>ann::FFN&lt;...&gt;</code> (I have no idea what exactly the parameters to FFN would be; I haven't thought it through yet).  If that's the case, I think we should move that direction, get rid of the old <code>SparseAutoencoder</code> code, and then find ways to clean up the code and make it do the other things you want it to.</p>

<p>(If this isn't reasonable, let me know---I'm just trying to figure out a good way to integrate this code in a way that keeps the complexity of the resulting code down as much as possible.  I'm not a particular expert on autoencoders, though I am familiar enough with them, so my suggestions may not make 100% sense.  I like finding where code is duplicated and removing it. :))</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/pull/451#issuecomment-160760093">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFH96h-Ubuu7S72TeC-R_L3IqKvDEks5pLLBTgaJpZM4GAqt4.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-160760093"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>