mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
Always display GROUND TRUTH. BEST OCR and ALIGNED TRUTH only if different for debug_level -1
This commit is contained in:
parent
84d4cc2e95
commit
51c3535310
@ -879,10 +879,8 @@ Trainability LSTMTrainer::PrepareForBackward(const ImageData* trainingdata,
|
||||
targets->SubtractAllFromFloat(*fwd_outputs);
|
||||
if (debug_interval_ != 0) {
|
||||
if (truth_text != ocr_text) {
|
||||
tprintf("Iteration %d: GROUND TRUTH : %s\n",
|
||||
training_iteration(), truth_text.string());
|
||||
tprintf("Iteration %d: BEST OCR TEXT : %s\n", training_iteration(),
|
||||
ocr_text.string());
|
||||
tprintf("Iteration %d: BEST OCR TEXT : %s\n",
|
||||
training_iteration(), ocr_text.string());
|
||||
}
|
||||
}
|
||||
double char_error = ComputeCharError(truth_labels, ocr_labels);
|
||||
@ -1046,8 +1044,12 @@ bool LSTMTrainer::DebugLSTMTraining(const NetworkIO& inputs,
|
||||
GenericVector<int> xcoords;
|
||||
LabelsFromOutputs(outputs, &labels, &xcoords);
|
||||
STRING text = DecodeLabels(labels);
|
||||
tprintf("Iteration %d: ALIGNED TRUTH : %s\n",
|
||||
tprintf("Iteration %d: GROUND TRUTH : %s\n",
|
||||
training_iteration(), truth_text.string());
|
||||
if (truth_text != text) {
|
||||
tprintf("Iteration %d: ALIGNED TRUTH : %s\n",
|
||||
training_iteration(), text.string());
|
||||
}
|
||||
if (debug_interval_ > 0 && training_iteration() % debug_interval_ == 0) {
|
||||
tprintf("TRAINING activation path for truth string %s\n",
|
||||
truth_text.string());
|
||||
|
Loading…
Reference in New Issue
Block a user