Skip to content

Instantly share code, notes, and snippets.

@tieorange
Created May 6, 2015 20:27
Show Gist options
  • Save tieorange/f9e64cc7fc0005c21931 to your computer and use it in GitHub Desktop.
Save tieorange/f9e64cc7fc0005c21931 to your computer and use it in GitHub Desktop.
def activation(self, inputs_row):
# dot product calc
rez = 0
for w, i in zip(self.weights, inputs_row):
rez += w * i
if rez >= 0:
return 1
else:
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment