mittagessen / kraken

OCR engine for all the languages
http://kraken.re
Apache License 2.0
750 stars 131 forks source link

is the last model saved when training fixed length? #654

Open dstoekl opened 3 weeks ago

dstoekl commented 3 weeks ago

When I launch

$ketos segtrain -o X -i Y -q fixed -N 200 --workers 10 -t A -e B -f xml --topline -d cuda:0

the last lines look like this. 199 is repeated. There is no model 200. Is this just the python numbering starting with 0, so model 199 is model 200? But then why does 199 have two eval rows pls?

image

mittagessen commented 2 weeks ago

On 24/11/01 01:59AM, Daniel Stoekl wrote:

When I launch

$ketos segtrain -o X -i Y -q fixed -N 200 --workers 10 -t A -e B -f xml --topline -d cuda:0

the last lines look like this. 199 is repeated. There is no model 200. Is this just the python numbering starting with 0, so model 199 is model 200? But then why does 199 have two eval rows pls?

Are you sure you didn't press enter or anything to cause the progress bar redraw? It shouldn't run the terminal epoch twice obviously.

dstoekl commented 2 weeks ago

yes, it always happens.

PonteIneptique commented 2 weeks ago

I just had a similar weird issue in recognition mode:

stage 0/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:30 • 0:00:00 0.94it/s val_accuracy: 0.944 val_word_accuracy: 0.636
stage 1/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:29 • 0:00:00 0.95it/s val_accuracy: 0.953 val_word_accuracy: 0.648
stage 2/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:30 • 0:00:00 0.92it/s val_accuracy: 0.959 val_word_accuracy: 0.693
stage 3/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:32 • 0:00:00 0.88it/s val_accuracy: 0.964 val_word_accuracy: 0.693
stage 4/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:30 • 0:00:00 0.93it/s val_accuracy: 0.973 val_word_accuracy: 0.784
stage 5/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:30 • 0:00:00 0.95it/s val_accuracy: 0.977 val_word_accuracy: 0.807
stage 6/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:30 • 0:00:00 0.92it/s val_accuracy: 0.986 val_word_accuracy: 0.886
stage 7/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:30 • 0:00:00 0.94it/s val_accuracy: 0.989 val_word_accuracy: 0.909
stage 8/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:29 • 0:00:00 0.95it/s val_accuracy: 0.989 val_word_accuracy: 0.909
stage 9/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:29 • 0:00:00 0.97it/s val_accuracy: 0.989 val_word_accuracy: 0.909`Trainer.fit` stopped: `max_epochs=10` reached.
stage 9/10 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28/28 0:00:29 • 0:00:00 0.97it/s val_accuracy: 0.991 val_word_accuracy: 0.932

-N 10 --fixed 10