tsujuifu / pytorch_graph-rel

A PyTorch implementation of GraphRel
MIT License
268 stars 54 forks source link

Equations and Code Matching Issue #21

Open JingliSHI0206 opened 3 years ago

JingliSHI0206 commented 3 years ago

Hi,

First, i cannot figure out what is the real meaning of h_w1 and h_w2 in the paper. author never gives a description of them based on the below equation. image

then, I start to search them in code, and I find they are totally same. please correct me if I'm wrong. the calculation of S(w1, r, w2) uses the below code.

image

however, both trs0_rel and trs1_rel are linear functions with same dimension. same input are passed to them and i think the output should be also same.

self.trs0_rel = nn.Linear(self.hid_size2, self.hid_size) self.trs1_rel = nn.Linear(self.hid_size2, self.hid_size)

so my question is, if one linear function is enough, why two are listed with different notations?

any explanations are greatly appreciated. thank you

Junzizaiji commented 1 year ago

Hello, I would like to know where the three learnable relationship matrices are represented in the code