From c22eba3d5c7d0618509c7c530463d754c0b284db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Thu, 6 Jul 2023 17:24:35 +0200 Subject: [PATCH] Add version number to Network Remove uneeded console output --- sample/main.cc | 1 + src/Network.cc | 1 - src/Network.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sample/main.cc b/sample/main.cc index 5d11d9a..8d65ba0 100644 --- a/sample/main.cc +++ b/sample/main.cc @@ -226,6 +226,7 @@ int main(int argc, char** argv) //showCPDS(network); cout << "Score: " << network.score(Xd, y) << endl; cout << "PyTorch version: " << TORCH_VERSION << endl; + cout << "BayesNet version: " << network.version() << endl; unsigned int nthreads = std::thread::hardware_concurrency(); cout << "Computer has " << nthreads << " cores." << endl; return 0; diff --git a/src/Network.cc b/src/Network.cc index 130d317..458eadb 100644 --- a/src/Network.cc +++ b/src/Network.cc @@ -100,7 +100,6 @@ namespace bayesnet { if (maxThreadsRunning < 1) { maxThreadsRunning = 1; } - cout << "Using " << maxThreadsRunning << " threads" << " maxThreads: " << maxThreads << endl; vector threads; mutex mtx; condition_variable cv; diff --git a/src/Network.h b/src/Network.h index 2eb2b82..db4a1e3 100644 --- a/src/Network.h +++ b/src/Network.h @@ -36,6 +36,7 @@ namespace bayesnet { vector predict(const vector>&); vector> predict_proba(const vector>&); double score(const vector>&, const vector&); + inline string version() { return "0.1.0"; } }; } #endif \ No newline at end of file