Created
September 6, 2016 21:43
-
-
Save malaikannan/1b09fb8c64f25ca8d57df325d3aa28d6 to your computer and use it in GitHub Desktop.
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
import numpy as np | |
#sigmoid activation function | |
# This can be replaced by other activation function like RELU, Tanh etc. | |
def sigmoid(x,derivative=False): | |
if(derivative==True): | |
return x*(1-x) | |
return 1/(1+np.exp(-x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment