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

Thanks to your code #2

Closed Roger672 closed 4 years ago

Roger672 commented 4 years ago

Thanks to your code. I trained a NER model with LSTM_CRF_faster_parallel.py. During the trainning, the loss values could be negetive in some steps. So I changed the loss into torch.sum(torch.abs(forward_score - gold_score))/batch_size. Then the loss values were all positive and the model was better fitting with my data.

mali19064 commented 4 years ago

Thanks for your feedback, the problem has been repaired now,