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

is it possible to change the learning rate ? #80

Closed philippemejane closed 5 years ago

philippemejane commented 5 years ago

When I train the model, the loss increase. I would like to change the learning rate but I don't see it in the code.

Hironsan commented 5 years ago

You can pass optimizer to Sequence class.

from keras import optimizers

sgd = optimizers.SGD(lr=0.01, decay=1e-6, momentum=0.9)
model = anago.Sequence(..., optimizer=sgd)
philippemejane commented 5 years ago

Great ! Thanks a lot