title: Neural network activation/output
body: <p>Here is my code (for a neuron in a MLP network):</p>
  
  <pre><code>double summation = 0;
  for (int i = 0; i &lt; weights.length; i++) {
      summation += inputs[i] * weights[i];
  }
  
  double normalized = Math.tanh(summation);
  if (normalized &gt; 0.9 || normalized &lt; -0.9) {
      activated = 1;
  } else {
      activated = 0;
  }
  </code></pre>
  
  <p>I think it is incorrect. Is the output supposed to be the normalized value, or is it always limited to 0 or 1?</p>