Kaniblu Pytorch-BiLSTM-CRF

From GM-RKB
Jump to navigation Jump to search

A Kaniblu Pytorch-BiLSTM-CRF is a Bidirectional LSTM/CRF (BiLTSM-CRF) Training System that leverages mini-batch operations on multiple GPUs.



References

2018

(sents.txt)

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.py using --input-path and --label-path respectively.

python train.py --input-path sents.txt --input-path pos.txt --label-path labels.txt

You might need to setup several more parameters in order to make it work. Checkout examples/atis for an example of training a simple BiLSTM-CRF model with ATIS dataset. Run python preprocess.py at the example directory to convert to the dataset to train.py-friendly format, then run

python ../../train.py --config train-atis.yml

to 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.