131250208 / TPlinker-joint-extraction

438 stars 94 forks source link

softmax #10

Closed hellosaferide closed 3 years ago

hellosaferide commented 3 years ago

在论文中你使用了softmax对标签进行对分类,然而在代码中,我没发现softmax函数,而是直接使用linear直接输出两个值

131250208 commented 3 years ago

@hellosaferide 你好,感谢关注~ 我们代码里的loss function使用的是torch.nn.CrossEntropyLoss,本身包含了softmax操作,所以不需要再自己做softmax了,可以参考官方文档。

hellosaferide commented 3 years ago

谢谢回答