This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
BiLSTM-CRF的PyTorch教学实现,矩阵化版本,含详尽注释和举例 | |
参考 | |
- PyTorch官方教学代码: https://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html | |
- 矩阵化推导: https://zhuanlan.zhihu.com/p/44042528 | |
- BiLSTM-CRF原文: https://arxiv.org/pdf/1508.01991v1.pdf | |
by 虎哥@知乎 [email protected] 2019/12/16 | |
""" | |
import torch |