Created
May 6, 2015 20:28
-
-
Save tieorange/2299116cea18c2698219 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
def activation(self, inputs_row): | |
# dot product calc | |
# inputs_row example = [-0.81239265210117029, 0.85921322532026534, -1, 1] | |
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