Created
October 7, 2019 21:26
-
-
Save bobbywlindsey/9606977f816e9b6efa792371babfebe9 to your computer and use it in GitHub Desktop.
Perceptron activation functions
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 sign(x): | |
if x > 0: | |
return 1.0 | |
elif x < 0: | |
return -1.0 | |
else: | |
return 0.0 | |
def step(x): | |
if x >= 0: | |
return 1.0 | |
else: | |
return 0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment