title: Implementing sigmoid function in python
body: <p>I am trying to implement a simple neural network for XOR function.
  The activation function I am using is Sigmoid function.
  The code for the sigmoid function is:</p>
  
  <pre><code>def ActivationFunction(a)
      e = 2.671                   # Sigmoid Function
      expo = e ** a
      val = expo / (1 + expo)
      return val
  </code></pre>
  
  <p>My problem is that this function is always returning a value between 0.7 and 0.8. This problem is showing a major effect in the output process.</p>
  
  <p>Any suggestions would be appriciated.</p>