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

Save train model #101

Closed behitek closed 5 years ago

behitek commented 5 years ago

I retrain model follow the instruction at README.md, but i can not find how to save trained model

>>> import anago
>>> model = anago.Sequence()
>>> model.fit(x_train, y_train, epochs=15)
Epoch 1/15
541/541 [==============================] - 166s 307ms/step - loss: 12.9774
...
# Done train
# But how to save

I found:

# model.save(self, weights_file, params_file, preprocessor_file)

This function require 3 para, but how can i find these para with this training way?

These Issues do not fix solve my problem:

  1. https://github.com/Hironsan/anago/issues/63
  2. https://github.com/Hironsan/anago/issues/36
Hironsan commented 5 years ago

See: https://github.com/Hironsan/anago/blob/master/examples/training_example.py