# this file will be used for both training and test % cat train 3 i N eat V pancakes N 3 eat V some N pancakes N 3 one ONE two TWO three THREE 3 one ONE two TWO three THREE 3 one ONE two TWO three THREE % ./crf.py train train Using device: cpu training data: words tensor([[2, 3, 4, 0, 0, 0, 0, 0, 0, 0], [3, 5, 4, 0, 0, 0, 0, 0, 0, 0], [6, 7, 8, 0, 0, 0, 0, 0, 0, 0], [6, 7, 8, 0, 0, 0, 0, 0, 0, 0], [6, 7, 8, 0, 0, 0, 0, 0, 0, 0]]) training data: tags tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) num_sents 5 max sent length 10 number of words in vocab 8 number of tags 5 learning rate 0.01 batch size 100 iteration 0 batch 0 gold_logscore 0.0 all_logscore 58.68034362792969 loss 58.68034362792969 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 1 batch 0 gold_logscore 0.6021999716758728 all_logscore 58.680458068847656 loss 58.0782585144043 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 2 batch 0 gold_logscore 1.806382656097412 all_logscore 58.68133544921875 loss 56.87495422363281 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 3 batch 0 gold_logscore 3.6120920181274414 all_logscore 58.6844482421875 loss 55.072357177734375 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 4 batch 0 gold_logscore 6.018587112426758 all_logscore 58.692264556884766 loss 52.673675537109375 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 5 batch 0 gold_logscore 9.02475643157959 all_logscore 58.70879364013672 loss 49.68403625488281 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 6 batch 0 gold_logscore 12.628976821899414 all_logscore 58.74049758911133 loss 46.11151885986328 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 7 batch 0 gold_logscore 16.828842163085938 all_logscore 58.79827117919922 loss 41.96942901611328 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 8 batch 0 gold_logscore 21.62067222595215 all_logscore 58.90186309814453 loss 37.28118896484375 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0 iteration 9 batch 0 gold_logscore 26.998416900634766 all_logscore 59.091392517089844 loss 32.09297561645508 yhat tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) true tensor([[1, 2, 1, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0], [3, 4, 5, 0, 0, 0, 0, 0, 0, 0]]) correct 15 total 15 tag accuracy rate 1.0