Skip to content

Commit 0e71e5a

Browse files
committed
lstmtraining: Remove dead code for purified model name
The purified model name `model_output` was unused, so remove the comment and the unused code. Signed-off-by: Stefan Weil <[email protected]>
1 parent 0e43ae5 commit 0e71e5a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/training/lstmtraining.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ const int kNumPagesPerBatch = 100;
7373
int main(int argc, char **argv) {
7474
tesseract::CheckSharedLibraryVersion();
7575
ParseArguments(&argc, &argv);
76-
// Purify the model name in case it is based on the network string.
7776
if (FLAGS_model_output.empty()) {
7877
tprintf("Must provide a --model_output!\n");
7978
return EXIT_FAILURE;
@@ -82,13 +81,6 @@ int main(int argc, char **argv) {
8281
tprintf("Must provide a --traineddata see training wiki\n");
8382
return EXIT_FAILURE;
8483
}
85-
STRING model_output = FLAGS_model_output.c_str();
86-
for (int i = 0; i < model_output.length(); ++i) {
87-
if (model_output[i] == '[' || model_output[i] == ']')
88-
model_output[i] = '-';
89-
if (model_output[i] == '(' || model_output[i] == ')')
90-
model_output[i] = '_';
91-
}
9284

9385
// Check write permissions.
9486
STRING test_file = FLAGS_model_output.c_str();

0 commit comments

Comments
 (0)