From bda06e60a7c87bcd769e7437d8cd8ba2b7a30bd4 Mon Sep 17 00:00:00 2001
From: Aya SAIDI <aya.saidi@auditeur.ec-lyon.fr>
Date: Tue, 8 Nov 2022 01:22:42 +0100
Subject: [PATCH] Update mlp.py

---
 mlp.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mlp.py b/mlp.py
index 73a66ed..963aac5 100644
--- a/mlp.py
+++ b/mlp.py
@@ -1,4 +1,8 @@
 import numpy as np
+import matplotlib.pyplot as plt
+import math
+import random
+from read_cifar import *
 #We are using the segmoid activation function
 def segmoid(x):
     return 1/(1+np.exp(-x))
@@ -19,7 +23,7 @@ def learn_once_mse(w1,b1,w2,b2,data,targets,learning_rate):
     A2=segmoid(np.matmul(A1,w2) + b2)
     #Let calculate the partial derivates
     #2
-    D_A2=2*(A2-tragets)
+    D_A2=2*(A2-targets)
     D_A2_T=np.matmul(A2,(1-A2).T)
     D_Z2=np.matmul(D_A2_T,D_A2)
     D_W2=np.matmul(A1.T,D_Z2)
-- 
GitLab