gaohongkui / GlobalPointer_pytorch

全局指针统一处理嵌套与非嵌套NER的Pytorch实现
380 stars 45 forks source link

请问gp 算logits的时候 最后为什么要 开方? #18

Closed CheungZeeCn closed 1 year ago

CheungZeeCn commented 1 year ago

https://github.com/gaohongkui/GlobalPointer_pytorch/blob/d32f84b423c787d07ad4092ad0a922dc594987fb/models/GlobalPointer.py#L208

谢谢

CheungZeeCn commented 1 year ago

好像是 dot scaled attn 缘故 ?

gaohongkui commented 1 year ago

是的,参考的 Self-Attention 计算方式

CheungZeeCn commented 1 year ago

谢谢~