Skip to content

Instantly share code, notes, and snippets.

@bobbywlindsey
Created October 7, 2019 21:26
Show Gist options
  • Save bobbywlindsey/9606977f816e9b6efa792371babfebe9 to your computer and use it in GitHub Desktop.
Save bobbywlindsey/9606977f816e9b6efa792371babfebe9 to your computer and use it in GitHub Desktop.
Perceptron activation functions
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