diff --git a/__pycache__/mlp.cpython-311.pyc b/__pycache__/mlp.cpython-311.pyc index bb937b794b6ea34fcb11112df2f42871158716af..3f1d1dee98f2c4ec76d557098197124c19112e8f 100644 Binary files a/__pycache__/mlp.cpython-311.pyc and b/__pycache__/mlp.cpython-311.pyc differ diff --git a/main.py b/main.py index 1f99474e688214777398c3c9261b49762df54245..87edc61aecde21d28ab261121ab897d2310662d1 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,10 @@ 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, diff --git a/mlp.py b/mlp.py index 183beef2c9e6e727f814c260ac047357ed0837b3..6edf22091bb205df40fabb93a49831355b4a85c7 100644 --- a/mlp.py +++ b/mlp.py @@ -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 diff --git a/resultats/mlp.png b/resultats/mlp.png deleted file mode 100644 index c9cd4d59f9330fd1e902560bc908bbf8b114ef25..0000000000000000000000000000000000000000 Binary files a/resultats/mlp.png and /dev/null differ diff --git a/resultats/mlp1.png b/resultats/mlp1.png new file mode 100644 index 0000000000000000000000000000000000000000..b53810071fa622dd174502941987192ef598e93b Binary files /dev/null and b/resultats/mlp1.png differ