Python/Python 딥러닝

Perceptron(퍼셉트론) 다수의 신호를 입력 받아서, 하나의 신호를 출력 - And Gate def and_gate(x1, x2): w1, w2 = 1.0, 1.0 # 가중치 bias = -1 y = x1 * w1 + x2 * w2 + bias if y > 0: return 1 else: return 0 - Or Gate def or_gate(x1, x2): w1, w2 = 1.0, 1.0 b = -0.5 y = x1 * w1 + x2 * w2 + b if y > 0: return 1 else: return 0 - Nand Gate def nand_gate(x1, x2): w1, w2 = 0.5, 0.5 # 가중치(weight) b = 0 # 편향(bias) y = x1 * w1 + x2 * w2 ..
Codezoy
'Python/Python 딥러닝' 카테고리의 글 목록 (5 Page)