mali19064 / LSTM-CRF-pytorch-faster

A more than 1000X faster paralleled LSTM-CRF implementation modified from the slower version in the Pytorch official tutorial (URL:https://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html).
204 stars 50 forks source link

并行版本的解码函数有错误 #6

Open 760bdteam opened 3 years ago

760bdteam commented 3 years ago

这个代码(batch并行版本)在解码的时候是有问题的,gammar_r_l的维度是[seq_len,target_size],trainsitions的维度是[target_size,target_size],这两个变量直接相加是不行的,目测应该由于代码里没有做预测,所以忽视了这部分代码的改写

ChuanMeng commented 2 years ago

我仔细看了一下,没错误吧,gammar_r_l是[tagset_size, tagset_size],trainsitions也是[tagset_size, tagset_size]