Skip to content

Commit

Permalink
Modify:np.sum()
Browse files Browse the repository at this point in the history
  • Loading branch information
koki0702 committed Aug 16, 2016
1 parent 53a7e66 commit 5b23566
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ch02/and_gate.py
Expand Up @@ -6,7 +6,7 @@ def AND(x1, x2):
x = np.array([x1, x2])
w = np.array([0.5, 0.5])
b = -0.7
tmp = (w*x).sum() + b
tmp = np.sum(w*x) + b
if tmp <= 0:
return 0
else:
Expand Down
2 changes: 1 addition & 1 deletion ch02/nand_gate.py
Expand Up @@ -6,7 +6,7 @@ def NAND(x1, x2):
x = np.array([x1, x2])
w = np.array([-0.5, -0.5])
b = 0.7
tmp = (w*x).sum() + b
tmp = np.sum(w*x) + b
if tmp <= 0:
return 0
else:
Expand Down
2 changes: 1 addition & 1 deletion ch02/or_gate.py
Expand Up @@ -6,7 +6,7 @@ def OR(x1, x2):
x = np.array([x1, x2])
w = np.array([0.5, 0.5])
b = -0.2
tmp = (w*x).sum() + b
tmp = np.sum(w*x) + b
if tmp <= 0:
return 0
else:
Expand Down

0 comments on commit 5b23566

Please sign in to comment.