import numpy as np
import math
"""正向传播"""
n = 3
m = 13
win = np.ones((n, 1))
w12 = np.ones((m, n))
w23 = np.ones((m, n))
out = np.ones((n, 1))
print(w12)
x = np.ones((n, 1))
th1 = np.zeros((n, 1))
th2 = np.zeros((m, 1))
th3 = np.zeros((n, 1))
xin = x
y0 = np.ones((n, 1))
y0 = 1.0 / (1 + pow(math.e, -xin-th1))
xhid = np.dot(w12, xin)
y1 = np.ones((m, 1))
y1 = 1.0 / (1 + pow(math.e, -xhid-th2))
"""
此时隐藏层 为 y1 (m行1列的 列向量)
"""
xout = np.dot(w23.T, y1) - th3
y2 = np.ones((n, 1))
y2 = 1.0 / (1 + pow(math.e, -xout-th3))
print(y2)
"""正向传播 结束 """