Skip to content
Snippets Groups Projects
Commit 022e1f73 authored by widad174's avatar widad174
Browse files

Update

parent 30ace205
Branches
No related tags found
No related merge requests found
No preview for this file type
from read_cifar import *
from mlp import *
from knn import *
#from knn import *
path = r'C:\Users\hp\Desktop\BE\image-classification\data'
'''
if __name__ == "__main__":
split_factor = 0.9
X, y = read_cifar(path)
......@@ -18,7 +18,7 @@ if __name__ == "__main__":
'''
if __name__ == "__main__":
split_factor = 0.9
data, labels = read_cifar(path)
......@@ -26,7 +26,7 @@ if __name__ == "__main__":
data_train, data_test = data_train/255.0, data_test/255.0
# parameters of the MLP :
d_h = 64
learning_rate = 0.9
learning_rate = 0.1
num_epoch = 100
train_accuracies, test_accuracy = run_mlp_training(data_train, labels_train, data_test,
......
......@@ -173,4 +173,4 @@ def plot_accuracy_versus_epoch(accuracies):
plt.xlabel("Epochs")
plt.ylabel("Accuracy")
plt.grid(axis='both', which='both')
plt.savefig(r'C:\Users\hp\Desktop\BE\image-classification\resultats\mlp.png')
\ No newline at end of file
plt.savefig(r'C:\Users\hp\Desktop\BE\image-classification\resultats\mlp1.png')
\ No newline at end of file
resultats/mlp.png

94.2 KiB

resultats/mlp1.png

44.4 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment