Skip to content
Snippets Groups Projects
Commit 1c8a9357 authored by Danjou Pierre's avatar Danjou Pierre
Browse files

last update

parent a13e0c64
Branches
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ def learn_once_mse(w1, b1, w2, b2, data, targets, learning_rate): ...@@ -23,7 +23,7 @@ def learn_once_mse(w1, b1, w2, b2, data, targets, learning_rate):
a1 = sigmoid(z1) # output of the hidden layer (sigmoid activation function) a1 = sigmoid(z1) # output of the hidden layer (sigmoid activation function)
z2 = np.matmul(a1, w2) + b2 # input of the output layer z2 = np.matmul(a1, w2) + b2 # input of the output layer
a2 = sigmoid(z2) # output of the output layer (sigmoid activation function) a2 = sigmoid(z2) # output of the output layer (sigmoid activation function)
predictions = a2 # the predicted values are the outputs of the output layer predictions = a2 # the predicted values ar the outputs of the output layer
# Compute loss (MSE) # Compute loss (MSE)
loss = np.mean(np.square(predictions - targets)) loss = np.mean(np.square(predictions - targets))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment