<p>This commit intent to complete two things</p>

<p>1 : improve the speed of SparseAutoencoder<br>
I cache the computation result in the data member, so the algorithm do not need to compute it two times.Since the member function is const, I declared the data member as mutable;Do anyone think that make the member function as non-const would be better?</p>

<p>2 : make the SparseAutoencoder more versatile<br>
I add two template parameters as following</p>

<p>template<br>
class SparseAutoencoderFunction;</p>

<p>This allow users use different layer from ann two compute the features</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/mlpack/mlpack/pull/451'>https://github.com/mlpack/mlpack/pull/451</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>improve speed of SparseAutoencoder and make it more flexible</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/mlpack/mlpack/pull/451/files#diff-0">src/mlpack/methods/ann/activation_functions/lazy_logistic_function.hpp</a>
    (90)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/mlpack/mlpack/pull/451/files#diff-1">src/mlpack/methods/ann/sparse_autoencoder_function.hpp</a>
    (388)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/mlpack/mlpack/pull/451.patch'>https://github.com/mlpack/mlpack/pull/451.patch</a></li>
  <li><a href='https://github.com/mlpack/mlpack/pull/451.diff'>https://github.com/mlpack/mlpack/pull/451.diff</a></li>
</ul>

<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">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCRn7fY5VEzo-r2slm5zymMKS78zks5oz5dvgaJpZM4GAqt4.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"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>