mittagessen / kraken

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

Command --load --savefreq #432

Closed PaulineJac closed 1 year ago

PaulineJac commented 1 year ago

Hello Kraken Team!

Due to a GPU limitation, I would like to restart a training from the last created model. Reading your document, I see that I should use the commands --savefreq and --load to restart from the last model. However, I do not manage to implement these commands correctly in my bash script : could you give me an example of how to use these two commands correctly ?

Thank you for your help, Pauline

mittagessen commented 1 year ago

You don't need the --save-freq argument. Just something like:

ketos train -i $model.mlmodel .... 

or

ketos segtrain -i $model.mlmodel ....

is sufficient. You might want to add --load-hyper-parameters to load them from the model file instead of taking the defaults. In addition, you need to make sure that the train/val data split is fixed, otherwise the character sets between the two training runs can well be different (which would require an adaptation of the last layer of the network, described here).

PaulineJac commented 1 year ago

Thank you for the extremely quick response and the advice; I have just tried it and it works fine. Thank you, Pauline