Skip to content

Commit

Permalink
corrections for last manual merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerHobbelt committed Aug 3, 2024
1 parent c112e5e commit 0ace96e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ccmain/ltrresultiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ float LTRResultIterator::Confidence(PageIteratorLevel level) const {
best_choice = res_it.word()->best_choice;
mean_certainty = best_choice->certainty(blob_index_);
certainty_count = 1;
break;
default:
ASSERT_HOST_MSG(false, "Should never get here.");
break;
}
if (certainty_count > 0) {
mean_certainty /= certainty_count;
Expand Down
1 change: 1 addition & 0 deletions src/training/unicharset/lstmtrainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ Trainability LSTMTrainer::PrepareForBackward(const ImageData *trainingdata,
// Apart from space and null, increment the label. This changes the
// script-id to the same script-id but upside-down.
// The labels need to be reversed in order, as the first is now the last.
//
// TODO: possibly wrong code, check.
for (auto truth_label : truth_labels) {
if (truth_label != UNICHAR_SPACE && truth_label != null_char_) {
Expand Down

0 comments on commit 0ace96e

Please sign in to comment.