Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bigsnarfdude/4d497d8e008ddc195345b9d12244c658 to your computer and use it in GitHub Desktop.
Save bigsnarfdude/4d497d8e008ddc195345b9d12244c658 to your computer and use it in GitHub Desktop.
sigmoid function
def sigmoid(z):
"""The sigmoid function."""
return 1.0/(1.0+np.exp(-z))
def sigmoid_prime(z):
"""Derivative of the sigmoid function."""
return sigmoid(z)*(1-sigmoid(z))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment