Kaniblu Pytorch-BiLSTM-CRF
A Kaniblu Pytorch-BiLSTM-CRF is a Bidirectional LSTM/CRF (BiLTSM-CRF) Training System that leverages mini-batch operations on multiple GPUs.
- Context:
- Source Code available at: https://github.com/kaniblu/pytorch-bilstmcrf
- It was first developed by Yoo, (2018).
- Example(s):
- Counter-Example(s):
- See: Bidirectional Neural Network, Convolutional Neural Network, Conditional Random Field, Bidirectional Recurrent Neural Network, Dynamic Neural Network.
References
2018
- (Yoo, 2018) ⇒ BiLSTM-CRF on PyTorch repository: https://github.com/kaniblu/pytorch-bilstmcrf Retrieved 2018-06-10
- QUOTE: An efficient BiLSTM-CRF implementation that leverages mini-batch operations on multiple GPUs (...)
Training
Prepare data first. Data must be supplied with separate text files for each input or target label type. Each line contains a single sequence, and each pair of tokens are separated with a space. For example, for the task of Named Entity Recognition using words and Part-of-Speech tags, the input and label files might be prepared as follows:
- QUOTE: An efficient BiLSTM-CRF implementation that leverages mini-batch operations on multiple GPUs (...)
the fat rat sat on a mat
...
(post.txt)
det adj noun verb prep det noun
...
(labels.txt)
O O B-Animal O O O B-Object
...
- Then above input and label files are provided to
train.pyusing--input-pathand--label-pathrespectively.python train.py --input-path sents.txt --input-path pos.txt --label-path labels.txtYou might need to setup several more parameters in order to make it work. Checkout
examples/atisfor an example of training a simple BiLSTM-CRF model with ATIS dataset. Runpython preprocess.pyat the example directory to convert to the dataset totrain.py-friendly format, then runpython ../../train.py --config train-atis.ymlto see a running example. The example configuration assumes that standalone tensorboard is installed (you could turn it off in the configuration file).
For more information on the configurations, check out
python train.py --help.
- Then above input and label files are provided to