mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Update benchmark_binary.py
This commit is contained in:
parent
4df1bf7b5b
commit
e1fff4089b
@ -61,7 +61,7 @@ def compare_binaries(binaries, tries=3, dataset="train"):
|
|||||||
results.append(train(binary, base_net, tries, dataset=dataset))
|
results.append(train(binary, base_net, tries, dataset=dataset))
|
||||||
except:
|
except:
|
||||||
print(f"========== Erreur sur {binary} ==========")
|
print(f"========== Erreur sur {binary} ==========")
|
||||||
results.append(0)
|
results.append([0.]*tries)
|
||||||
|
|
||||||
x = [i for i in range(tries)]
|
x = [i for i in range(tries)]
|
||||||
|
|
||||||
@ -69,9 +69,8 @@ def compare_binaries(binaries, tries=3, dataset="train"):
|
|||||||
|
|
||||||
res = []
|
res = []
|
||||||
for i in range(len(binaries)):
|
for i in range(len(binaries)):
|
||||||
if results[i] != 0:
|
res.append(ax.plot(x, results[i])[0])
|
||||||
res.append(ax.plot(x, results[i])[0])
|
res[i].set_label(binaries[i])
|
||||||
res[i].set_label(binaries[i])
|
|
||||||
|
|
||||||
ax.set_ylabel("Taux de réussite (%)")
|
ax.set_ylabel("Taux de réussite (%)")
|
||||||
ax.set_xlabel("Nombre de batchs")
|
ax.set_xlabel("Nombre de batchs")
|
||||||
@ -80,5 +79,5 @@ def compare_binaries(binaries, tries=3, dataset="train"):
|
|||||||
|
|
||||||
plt.ylim(0, 100)
|
plt.ylim(0, 100)
|
||||||
plt.show()
|
plt.show()
|
||||||
return results
|
return binaries, results
|
||||||
|
|
Loading…
Reference in New Issue
Block a user