Skip to content
Snippets Groups Projects
Commit faf6c3f1 authored by Saidi Aya's avatar Saidi Aya
Browse files

Update mlp.py

parent 77a99859
Branches
No related tags found
No related merge requests found
......@@ -137,15 +137,3 @@ def run_mlp_training(data_train, labels_train, data_test, labels_test,d_h,learni
# Testing
final_accuracy=test_mlp(w1,b1,w2,b2,data_test,labels_test)
return train_accuracies, final_accuracy
def evolution_learning_acc(split_factor,d_h,num_epoch):
# This function plots the evolution of the learning accuracy as a function of the number of epoches
path_batches=str(dirname)+"\\data\\cifar-10-batches-py"+str(num_batch)
(data,labels)=read_cifar(dir_batches)
(data_train,data_test,labels_train,labels_test)=split_dataset(data,labels,split_factor)
accuracy=train_mlp(w1,b1,w2,b2,data_train,labels_train,learning_rate,num_epoch)[4]
epochs =[i+1 for i in range(0,num_epoch,1)]
plt.plot(epochs,accuracy)
plt.show()
plt.savefig("results\\mlp.png")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment