From 10dc129e1876711bab47bc552ffb36d149952336 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Wed, 8 Jan 2025 19:53:57 -0500 Subject: [PATCH] fix flags i think --- CMakeLists.txt | 2 +- graph.py | 2 +- src/MNIST.cpp | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36e8849..4392af7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(COSC-4P80-Final-Project VERSION 0.0.22) +project(COSC-4P80-Final-Project VERSION 0.0.23) option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) option(ENABLE_UBSAN "Enable the ub sanitizer" OFF) diff --git a/graph.py b/graph.py index c0c1f02..a275e59 100644 --- a/graph.py +++ b/graph.py @@ -31,7 +31,7 @@ def plot_stacked_graph(title, output, csv_file1, csv_file2, position, position2) ax.set_xlabel(x1_label) ax.set_ylabel(y1_label) - ax.legend() + # ax.legend() ax.set_title(title) plt.savefig(output) diff --git a/src/MNIST.cpp b/src/MNIST.cpp index 322bcfa..8fb81b8 100644 --- a/src/MNIST.cpp +++ b/src/MNIST.cpp @@ -638,12 +638,15 @@ namespace fp state << '\n'; state << stats; state << '\n'; - state << static_cast(std::max(static_cast(test_stats.size()) - 1, 0l)); + blt::i32 remove = 0; + if (stop_flag) + remove = 1; + state << static_cast(std::max(static_cast(test_stats.size()) - remove, 0l)); state << '\n'; if (!test_stats.empty()) { // the last test stat will be recalculated on restore. keeping it is an error. - for (const auto& v : blt::iterate(test_stats).take(test_stats.size() - 1)) + for (const auto& v : blt::iterate(test_stats).take(test_stats.size() - remove)) { state << v; state << '\n';