Always display GROUND TRUTH. BEST OCR and ALIGNED TRUTH only if different for debug_level -1

This commit is contained in:
Shree 2019-03-31 10:17:08 +00:00
parent 84d4cc2e95
commit 51c3535310

View File

@ -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());