mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-03-02 05:11:57 +01:00
training.train: add early stopping for OCR
This commit is contained in:
parent
36e370aa45
commit
7823ea2c95
1 changed files with 1 additions and 0 deletions
|
|
@ -672,6 +672,7 @@ def run(_config,
|
|||
model.compile(optimizer=opt) # rs: loss seems to be (ctc_batch_cost) in last layer
|
||||
|
||||
callbacks = [TensorBoard(os.path.join(dir_output, 'logs'), write_graph=False),
|
||||
EarlyStopping(verbose=1, patience=3, restore_best_weights=False, start_from_epoch=3),
|
||||
SaveWeightsAfterSteps(0, dir_output, _config)]
|
||||
if save_interval:
|
||||
callbacks.append(SaveWeightsAfterSteps(save_interval, dir_output, _config))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue