Professional Documents
Culture Documents
C8 Machine Learning PDF
C8 Machine Learning PDF
Deep Lerning
#training function
def perceptron(X, y, w_init):
w = [w_init]
N = X.shape[1]
while True:
# mix data
mix_id = np.random.permutation(N)
for i in range(N):
xi = X[:, mix_id[i]].reshape(3, 1)
yi = y[0, mix_id[i]]
Hàm ReLU
rectified linear unit
• Bước ngược: tìm đạo hàm của hàm tổn thất theo W và b
sao cho cực tiểu J, cập nhật W và b theo phương pháp
gradient descent , tính từ sau ra trước