关于biaffine classifier
jingsongs opened this issue · 2 comments
jingsongs commented
您好!
论文中用到的 biaffine classifier,公式如下,这里的W[si; oj ]是指什么? 另外代码的具体实现和公式是怎么对应的?
if self.bias_x:
x = torch.cat((x, torch.ones_like(x[..., :1])), -1)
if self.bias_y:
y = torch.cat((y, torch.ones_like(y[..., :1])), -1)
# [batch_size, n_out, seq_len, seq_len]
s = torch.einsum('bxi,oij,byj->boxy', x, self.weight, y)
谢谢啦
ljynlp commented
jingsongs commented
大致明白了,谢谢哈