diff --git a/src/lstm/lstmtrainer.cpp b/src/lstm/lstmtrainer.cpp index 2406bf39..898c4083 100644 --- a/src/lstm/lstmtrainer.cpp +++ b/src/lstm/lstmtrainer.cpp @@ -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 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());