Created
August 3, 2017 12:26
-
-
Save rscarrera27/1fd3062e788baa50fbe2c9794fb95b59 to your computer and use it in GitHub Desktop.
퍼셉트론 AND 게이트
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 AND(x1, x2): | |
w1, w2, theta = 0.5, 0.5, 0.7 | |
tmp = (x1 * w1) + (x2 * w2) | |
if tmp <= theta: | |
return 0 | |
elif tmp > theta: | |
return 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment