Created
April 27, 2020 14:45
-
-
Save ShairozS/bb0b57b315ece90c938e5f3850f8cf9b to your computer and use it in GitHub Desktop.
Train EntityRecognizer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Initialize the EntityRecognizer model | |
| ner = EntityRecognizer(data) | |
| # Find an optimal learning rate | |
| lr=ner.lr_find() | |
| # Set how many epochs (passes over training data) we'd like the model to train for | |
| epochs = 50 | |
| # Fit the model using the found learning rate and our specified epochs | |
| ner.fit(epochs=epochs, lr=lr) | |
| # Visualize the results | |
| ner.show_results() | |
| # Save the model | |
| ner.save(str(epochs) + "_model") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment