tesseract-ocr / tesseract

Tesseract Open Source OCR Engine (main repository)
https://tesseract-ocr.github.io/
Apache License 2.0
61.78k stars 9.46k forks source link

lstmtraining mutex lock failed #3655

Open stweil opened 2 years ago

stweil commented 2 years ago

Sometimes the training process lstmtraining raises an exception when the training is finished:

Finished! Selected model with minimal training error rate (BCER) = 2.849
libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument

Maybe that happens when the training finishes while the validation thread is still running.

stweil commented 2 years ago

In the same context another error can also occur (I got it yesterday while examining the above issue):

Finished! Selected model with minimal training error rate (BCER) = 12.951
num_docs > 0:Error:Assert failed:in file ../../../src/ccstruct/imagedata.cpp, line 697

This is an error which was already reported in issue #757.

amitdo commented 2 years ago

A general note: maybe we can adopt some of the suggestions from the C++ Core Guidelines: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#cp-concurrency-and-parallelism