mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
Merge pull request #3251 from stweil/master
Show names of failing lstmf files in error messages
This commit is contained in:
commit
e2852618fb
@ -12,7 +12,7 @@ SUBDIRS = . tessdata unittest
|
||||
EXTRA_DIST = README.md LICENSE
|
||||
EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh
|
||||
EXTRA_DIST += tesseract.pc.in java doc
|
||||
EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION src/vs2010
|
||||
EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION
|
||||
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
|
||||
|
@ -899,7 +899,7 @@ RECURSIVE = YES
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = ../src/vs2010
|
||||
EXCLUDE =
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
|
@ -813,19 +813,22 @@ Trainability LSTMTrainer::PrepareForBackward(const ImageData* trainingdata,
|
||||
bool invert = trainingdata->boxes().empty();
|
||||
if (!RecognizeLine(*trainingdata, invert, debug, invert, upside_down,
|
||||
&image_scale, &inputs, fwd_outputs)) {
|
||||
tprintf("Image not trainable\n");
|
||||
tprintf("Image %s not trainable\n",
|
||||
trainingdata->imagefilename().c_str());
|
||||
return UNENCODABLE;
|
||||
}
|
||||
targets->Resize(*fwd_outputs, network_->NumOutputs());
|
||||
LossType loss_type = OutputLossType();
|
||||
if (loss_type == LT_SOFTMAX) {
|
||||
if (!ComputeTextTargets(*fwd_outputs, truth_labels, targets)) {
|
||||
tprintf("Compute simple targets failed!\n");
|
||||
tprintf("Compute simple targets failed for %s!\n",
|
||||
trainingdata->imagefilename().c_str());
|
||||
return UNENCODABLE;
|
||||
}
|
||||
} else if (loss_type == LT_CTC) {
|
||||
if (!ComputeCTCTargets(truth_labels, fwd_outputs, targets)) {
|
||||
tprintf("Compute CTC targets failed!\n");
|
||||
tprintf("Compute CTC targets failed for %s!\n",
|
||||
trainingdata->imagefilename().c_str());
|
||||
return UNENCODABLE;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user