Traincascade time measurement is going loco (Bug #3656)
Description
If you look at the cascadeclassifier.cpp, I submitted a piece of code to measure the time for each stage to train.
// Output training time up till now float seconds = float( clock () - begin_time ) / CLOCKS_PER_SEC; int days = int(seconds) / 60 / 60 / 24; int hours = (int(seconds) / 60 / 60) % 24; int minutes = (int(seconds) / 60) % 60; int seconds_left = int(seconds) % 60; cout << "Training until now has taken " << days << " days " << hours << " hours " << minutes << " minutes " << seconds_left <<" seconds." << endl;
This worked perfectly under Windows 7 and had been working under Ubuntu 12.04 also, but lately I am getting reports of training times which take up to multiple hours but when I take a stopwatch to measure it myself, only 40 minutes have past or so. Keeping this bug report mainly to investigate the cause of this!
Associated revisions
Merge pull request #3656 from SeninAndrew:master
History
Updated by Alexander Smorkalov almost 11 years ago
- Target version changed from 2.4.9 to 2.4.10
Updated by Steven Puttemans almost 11 years ago
It seems that it has something to do with the number of cores used.
It counts all the clocks per sec over the complete set of cores. Does anyone know how I can avoid this and divide it correctly by the number of cores?
This seems to be only in Linux. Windows doesn't have the problem it seems.
- Affected version changed from 2.4.8 (latest release) to 2.4.9 (latest release)
Updated by Steven Puttemans almost 11 years ago
Discussed with some collegues who ran in same problem using the clock() interface.
They suggest using a principle called 'clock on the wall', will look into it and try to find a solution.
Updated by Dmitry Retinskiy almost 11 years ago
- Status changed from New to Open
Updated by Steven Puttemans over 10 years ago
Even weirder, it seems now that Ubuntu 14.04 is doing it correctly again.
Still have to take a closer look on what is happening and when it is going wrong.
Updated by Vadim Pisarevsky almost 10 years ago
ok, let's close it until it becomes obvious problem
- Status changed from Open to Cancelled
Updated by Steven Puttemans almost 10 years ago
Vadim Pisarevsky wrote:
ok, let's close it until it becomes obvious problem
Agreed!