<p>In <a href="https://github.com/mlpack/mlpack/pull/686#discussion_r66149003">src/mlpack/methods/ne/genome.hpp</a>:</p>
<pre style='color:#555'>&gt; +
&gt; +      // Loop neurons to calculate neurons&#39; activation.
&gt; +      for (unsigned in j=aNumInput; j&lt;aNeuronGenes.size(); ++j) {
&gt; +        double x = aNeuronGenes[j].aInput;  // TODO: consider bias. Difference?
&gt; +        aNeuronGenes[j].aInput = 0;
&gt; +
&gt; +        double y = 0;
&gt; +        switch (aNeuronGenes[j].Type()) { // TODO: revise the implementation.
&gt; +          case SIGMOID:                   // TODO: more cases.
&gt; +            y = sigmoid(x);
&gt; +            break;
&gt; +          case RELU:
&gt; +            y = relu(x);
&gt; +            break;
&gt; +          default:
&gt; +            y = sigmoid(x);
</pre>
<p>I think, since our network structure could be somewhat sparse:</p>

<pre><code>x0-----------------|
      |            |
      |---h0^0-----|---h0^1---|
x1----             |          |------o0
                   |          |
x2----------------------------|
</code></pre>

<p>it isn't that easy to reuse the activation function of the sparse autoencoder. However, what we should do here is to reuse the ann activation functions: <a href="https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods/ann/activation_functions">https://github.com/mlpack/mlpack/tree/master/src/mlpack/methods/ann/activation_functions</a></p>

<p>so instead of <code>y = sigmoid(x);</code> we can write <code>y = LogisticFunction::fn(x)</code><code>or</code><code>y = RectifierFunction::fn(x)</code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/686/files/3c8aa62b951f029b3883e9baef1ea556ef5af2d3#r66149003">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFD5dBFdrnqCfBZmzk88vK5egxIVJks5qJdgwgaJpZM4IwJa6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOYrGpfPiFp3Qn8BOijCTOqUe1S2ks5qJdgwgaJpZM4IwJa6.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/686/files/3c8aa62b951f029b3883e9baef1ea556ef5af2d3#r66149003"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>