mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-01 07:59:05 +08:00
Merge pull request #1493 from stweil/train
lstmtraining: Fix handling of --max_iterations
This commit is contained in:
commit
a474fd05a4
@ -195,7 +195,8 @@ int main(int argc, char **argv) {
|
||||
// Train a few.
|
||||
int iteration = trainer.training_iteration();
|
||||
for (int target_iteration = iteration + kNumPagesPerBatch;
|
||||
iteration < target_iteration;
|
||||
iteration < target_iteration &&
|
||||
(iteration < FLAGS_max_iterations || FLAGS_max_iterations == 0);
|
||||
iteration = trainer.training_iteration()) {
|
||||
trainer.TrainOnLine(&trainer, false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user