From e1fff4089b3a662b3a9f97bf1ecf2d9a29bdd148 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 24 Feb 2023 11:48:02 +0100 Subject: [PATCH] Update benchmark_binary.py --- src/scripts/benchmark_binary.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/scripts/benchmark_binary.py b/src/scripts/benchmark_binary.py index 479bbc5..75e6a9a 100644 --- a/src/scripts/benchmark_binary.py +++ b/src/scripts/benchmark_binary.py @@ -61,7 +61,7 @@ def compare_binaries(binaries, tries=3, dataset="train"): results.append(train(binary, base_net, tries, dataset=dataset)) except: print(f"========== Erreur sur {binary} ==========") - results.append(0) + results.append([0.]*tries) x = [i for i in range(tries)] @@ -69,9 +69,8 @@ def compare_binaries(binaries, tries=3, dataset="train"): res = [] for i in range(len(binaries)): - if results[i] != 0: - res.append(ax.plot(x, results[i])[0]) - res[i].set_label(binaries[i]) + res.append(ax.plot(x, results[i])[0]) + res[i].set_label(binaries[i]) ax.set_ylabel("Taux de réussite (%)") ax.set_xlabel("Nombre de batchs") @@ -80,5 +79,5 @@ def compare_binaries(binaries, tries=3, dataset="train"): plt.ylim(0, 100) plt.show() - return results + return binaries, results \ No newline at end of file