Created
July 17, 2016 00:06
-
-
Save bigsnarfdude/4d497d8e008ddc195345b9d12244c658 to your computer and use it in GitHub Desktop.
sigmoid function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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