Add version number to Network

Remove uneeded console output
This commit is contained in:
Ricardo Montañana Gómez 2023-07-06 17:24:35 +02:00
parent 71b88e2c65
commit c22eba3d5c
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
3 changed files with 2 additions and 1 deletions

View File

@ -226,6 +226,7 @@ int main(int argc, char** argv)
//showCPDS(network); //showCPDS(network);
cout << "Score: " << network.score(Xd, y) << endl; cout << "Score: " << network.score(Xd, y) << endl;
cout << "PyTorch version: " << TORCH_VERSION << endl; cout << "PyTorch version: " << TORCH_VERSION << endl;
cout << "BayesNet version: " << network.version() << endl;
unsigned int nthreads = std::thread::hardware_concurrency(); unsigned int nthreads = std::thread::hardware_concurrency();
cout << "Computer has " << nthreads << " cores." << endl; cout << "Computer has " << nthreads << " cores." << endl;
return 0; return 0;

View File

@ -100,7 +100,6 @@ namespace bayesnet {
if (maxThreadsRunning < 1) { if (maxThreadsRunning < 1) {
maxThreadsRunning = 1; maxThreadsRunning = 1;
} }
cout << "Using " << maxThreadsRunning << " threads" << " maxThreads: " << maxThreads << endl;
vector<thread> threads; vector<thread> threads;
mutex mtx; mutex mtx;
condition_variable cv; condition_variable cv;

View File

@ -36,6 +36,7 @@ namespace bayesnet {
vector<int> predict(const vector<vector<int>>&); vector<int> predict(const vector<vector<int>>&);
vector<pair<int, double>> predict_proba(const vector<vector<int>>&); vector<pair<int, double>> predict_proba(const vector<vector<int>>&);
double score(const vector<vector<int>>&, const vector<int>&); double score(const vector<vector<int>>&, const vector<int>&);
inline string version() { return "0.1.0"; }
}; };
} }
#endif #endif