Skip to content

Commit

Permalink
lstmtraining: Remove dead code for purified model name
Browse files Browse the repository at this point in the history
The purified model name `model_output` was unused,
so remove the comment and the unused code.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Oct 6, 2018
1 parent 0e43ae5 commit 0e71e5a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/training/lstmtraining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const int kNumPagesPerBatch = 100;
int main(int argc, char **argv) {
tesseract::CheckSharedLibraryVersion();
ParseArguments(&argc, &argv);
// Purify the model name in case it is based on the network string.
if (FLAGS_model_output.empty()) {
tprintf("Must provide a --model_output!\n");
return EXIT_FAILURE;
Expand All @@ -82,13 +81,6 @@ int main(int argc, char **argv) {
tprintf("Must provide a --traineddata see training wiki\n");
return EXIT_FAILURE;
}
STRING model_output = FLAGS_model_output.c_str();
for (int i = 0; i < model_output.length(); ++i) {
if (model_output[i] == '[' || model_output[i] == ']')
model_output[i] = '-';
if (model_output[i] == '(' || model_output[i] == ')')
model_output[i] = '_';
}

// Check write permissions.
STRING test_file = FLAGS_model_output.c_str();
Expand Down

0 comments on commit 0e71e5a

Please sign in to comment.