Hironsan / anago

Bidirectional LSTM-CRF and ELMo for Named-Entity Recognition, Part-of-Speech Tagging and so on.
https://anago.herokuapp.com/
MIT License
1.48k stars 371 forks source link

Resume training from previous epoch #110

Open behitek opened 4 years ago

behitek commented 4 years ago

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.

How can I resume training from previous epoch with exist weight file.

filepath = "model.h5"
checkpoint = ModelCheckpoint(filepath, monitor = 'loss', verbose = 1, save_best_only = True, mode = 'min')
model = anago.Sequence(embeddings=embeddings)

model.fit(x_train, y_train, x_valid, y_valid, epochs=7, batch_size=128, callbacks=[checkpoint])

I expect to get your help.